Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): sign in feature (#2683)
* feat(LoginPage): add initial LoginForm component * feat(LoginPage): add initial OtpForm component * feat: copy AuthService to new frontend * feat(ApiService): add initial ApiService for transforming axios errors * feat: add app ApiService with own axios instance * feat: add onSubmit prop to accept email form input * feat: add useInterval hook * feat: add useLocalStorage hook * feat: update ApiService to remove login key in localStorage on 401s * feat: add UserService partially moved from angularjs service * feat: add ResendOtpButton component for handling otp resend * feat: add business logic to OtpForm component * feat: add brand assets and login image * feat(LoginPage): add desktop layout and styling * feat: add initial mobile styling lacking footer, will probably do footer first then * feat: add demo login landing page * feat: add responsive styling to fit design * feat: add links to LoginPage * feat: setup msw and login mocks * chore: add msw-storybook-addon * feat: extract useUser from useAuth * feat: update storybook decorators * feat: add LoginPage responsive stories * chore: add alias for shared imports # Conflicts: # frontend/__tests__/storyshots/jest.config.js # frontend/tsconfig.paths.json * chore: add react-query package (missed from all the rebasing) * feat: update AuthContext to return isAuthenticated state * test: update msw return for wrong otp, add todo marker for logging * chore: add validator package * fix: add BrowserRouter to app, use correct export from useUser rebase conflicts * feat: make mobile view use full height for displaying login screen * feat: change textstyle of desktop footer to caption-2 * feat(LoginForm): sign in -> log in * feat: add mock server delay for msw routes * feat(OtpForm): show otp email in form label description * feat: add loading state for resend button * feat: allow `as` prop in custom Link component see https://chakra-ui.com/guides/as-prop * feat: add link back to landing page on form logo * chore: add react router package for storybook * refactor: simplify AuthContext to only hold isAuthenticated state * chore: add aliases for templates and features folder * feat: move useUser hook into features/user/queries file * refactor: extract components with style props spam to own component * fix: update typing of msw-storybook-addon * feat: only enable msw mocks during test environment * feat: add InvalidAgencyResponse story * feat: add "link" variant to Button style and use in ResendOtpButton * style: add caption-2 textStyle, update Typography story * fix: add explicit xs breakpoint when deciding to show desktop footer * style: update paddings for desktop LoginPage * feat: remove gov domain restriction, use backend to validate we actually have some govt users with non-gov.sg emails * feat: update login image * feat: update styling of login page to fit design * style: update sizing of login image * style: make login form more centered by reducing padding * feat: fix alignment of desktop footer links * fix: constrain Form brand link to smaller box area
- Loading branch information