From b52bc0af20402cfb54b7d358b9ab1a02fb1815b8 Mon Sep 17 00:00:00 2001 From: Abhinav-grd Date: Tue, 27 Apr 2021 12:59:32 +0530 Subject: [PATCH] reorder declarations --- .../gallery/components/CollectionNamer.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/pages/gallery/components/CollectionNamer.tsx b/src/pages/gallery/components/CollectionNamer.tsx index 7945c0fc7..f225943e0 100644 --- a/src/pages/gallery/components/CollectionNamer.tsx +++ b/src/pages/gallery/components/CollectionNamer.tsx @@ -6,14 +6,6 @@ import * as Yup from 'yup'; import SubmitButton from 'components/SubmitButton'; import MessageDialog from 'components/MessageDialog'; -interface Props { - show: boolean; - onHide: () => void; - attributes: CollectionNamerAttributes; -} -interface formValues { - albumName: string; -} export interface CollectionNamerAttributes { callback: (name) => Promise; title: string; @@ -25,13 +17,17 @@ export type SetCollectionNamerAttributes = React.Dispatch< React.SetStateAction >; +interface Props { + show: boolean; + onHide: () => void; + attributes: CollectionNamerAttributes; +} +interface formValues { + albumName: string; +} + export default function CollectionNamer({ attributes, ...props }: Props) { const collectionNameInputRef = useRef(null); - - const onSubmit = ({ albumName }: formValues) => { - attributes.callback(albumName); - props.onHide(); - }; useEffect(() => { if (attributes) { setTimeout(() => { @@ -44,6 +40,10 @@ export default function CollectionNamer({ attributes, ...props }: Props) { null} attributes={{}} /> ); } + const onSubmit = ({ albumName }: formValues) => { + attributes.callback(albumName); + props.onHide(); + }; return (