Quellcode durchsuchen

refactor: improve layout

poeti8 vor 6 Jahren
Ursprung
Commit
85091521c9
1 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen
  1. 9 6
      client/pages/reset-password.tsx

+ 9 - 6
client/pages/reset-password.tsx

@@ -27,7 +27,9 @@ const ResetPassword: NextPage<Props> = ({ token }) => {
   const addAuth = useStoreActions(s => s.auth.add);
   const addAuth = useStoreActions(s => s.auth.add);
   const [loading, setLoading] = useState(false);
   const [loading, setLoading] = useState(false);
   const [message, setMessage] = useMessage();
   const [message, setMessage] = useMessage();
-  const [formState, { email }] = useFormState<{ email: string }>();
+  const [formState, { email, label }] = useFormState<{ email: string }>(null, {
+    withIds: true
+  });
 
 
   useEffect(() => {
   useEffect(() => {
     if (auth.isAuthenticated) {
     if (auth.isAuthenticated) {
@@ -62,7 +64,7 @@ const ResetPassword: NextPage<Props> = ({ token }) => {
   // FIXME: make a container for width
   // FIXME: make a container for width
   return (
   return (
     <AppWrapper>
     <AppWrapper>
-      <Col width={600} maxWidth="97%">
+      <Col width={600} maxWidth="100%" px={3}>
         <H2 my={3} bold>
         <H2 my={3} bold>
           Reset password
           Reset password
         </H2>
         </H2>
@@ -70,17 +72,18 @@ const ResetPassword: NextPage<Props> = ({ token }) => {
           If you forgot you password you can use the form below to get reset
           If you forgot you password you can use the form below to get reset
           password link.
           password link.
         </Text>
         </Text>
-        w
+        <Text {...label("homepage")} as="label" mt={2} fontSize={[15, 16]} bold>
+          Email address
+        </Text>
         <Flex
         <Flex
           as="form"
           as="form"
-          flexDirection={["column", "row"]}
-          alignItems={["flex-start", "center"]}
+          alignItems="center"
           justifyContent="flex-start"
           justifyContent="flex-start"
           onSubmit={onSubmit}
           onSubmit={onSubmit}
         >
         >
           <TextInput
           <TextInput
             {...email("email")}
             {...email("email")}
-            placeholder="Email address"
+            placeholder="Email address..."
             height={[44, 54]}
             height={[44, 54]}
             width={[1, 1 / 2]}
             width={[1, 1 / 2]}
             mr={3}
             mr={3}