Skip to content

Commit

Permalink
indy form
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Jun 13, 2024
1 parent c9b910e commit b1f1219
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions src/pages/login/IndyForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Stack } from "@mui/material"
import { Stack, Typography } from "@mui/material"
import type { FC } from "react"

import * as form from "codeforlife/components/form"
import { Link } from "codeforlife/components/router"
import { useNavigate } from "codeforlife/hooks"
import { submitForm } from "codeforlife/utils/form"

Expand All @@ -18,15 +19,37 @@ const IndyForm: FC<IndyFormProps> = () => {
return (
<BaseForm
themedBoxProps={{ userType: "independent" }}
header="text"
subheader="text"
header="Welcome"
subheader="Please enter your login details."
initialValues={{ email: "", password: "" }}
onSubmit={submitForm(loginWithEmail, {
then: () => {
navigate(paths.indy.dashboard._)
},
})}
>
<form.EmailField required helperText="Enter your email address" />

Check failure on line 31 in src/pages/login/IndyForm.tsx

View workflow job for this annotation

GitHub Actions / main / test / test-js-code

Type '{ required: true; helperText: string; }' is not assignable to type 'IntrinsicAttributes & Omit<TextFieldProps, "name" | "type" | "schema"> & Partial<Pick<TextFieldProps, "name">>'.
<form.PasswordField required helperText="Enter your password" />

Check failure on line 32 in src/pages/login/IndyForm.tsx

View workflow job for this annotation

GitHub Actions / main / test / test-js-code

Type '{ required: true; helperText: string; }' is not assignable to type 'IntrinsicAttributes & Omit<TextFieldProps, "name" | "type" | "schema"> & Partial<Pick<TextFieldProps, "name" | "schema">>'.
<Stack>
<Typography variant="body2" fontWeight="bold" mb={0}>
Forgotten your password?
</Typography>
<Typography variant="body2">
Don&apos;t worry, you can&nbsp;
<Link to={paths.resetPassword.independent._}>
reset your password
</Link>
.
</Typography>
</Stack>
<Stack direction="row">
<Typography variant="body2" fontWeight="bold" my={0}>
Part of a school or club?&nbsp;
<Link fontWeight="normal" to={paths.login.student._}>
Log in here
</Link>
</Typography>
</Stack>
<Stack alignItems="end">
<form.SubmitButton>Log in</form.SubmitButton>
</Stack>
Expand Down

0 comments on commit b1f1219

Please sign in to comment.