瀏覽代碼

refactor: improve layout

poeti8 6 年之前
父節點
當前提交
85091521c9
共有 1 個文件被更改,包括 9 次插入6 次删除
  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}