|
1 | | -import { |
2 | | - ArrowLeftIcon, |
3 | | - BookIcon, |
4 | | - PersonIcon, |
5 | | - SignInIcon, |
6 | | -} from '@primer/octicons-react'; |
| 1 | +import { BookIcon, PersonIcon, SignInIcon } from '@primer/octicons-react'; |
7 | 2 | import { type FC, useCallback, useContext } from 'react'; |
8 | 3 | import { Form, type FormRenderProps } from 'react-final-form'; |
9 | | -import { useNavigate } from 'react-router-dom'; |
| 4 | +import { Header } from '../components/Header'; |
10 | 5 | import { Button } from '../components/fields/Button'; |
11 | 6 | import { FieldInput } from '../components/fields/FieldInput'; |
12 | 7 | import { AppContext } from '../context/App'; |
@@ -58,7 +53,6 @@ export const validate = (values: IValues): IFormErrors => { |
58 | 53 |
|
59 | 54 | export const LoginWithOAuthApp: FC = () => { |
60 | 55 | const { loginWithOAuthApp } = useContext(AppContext); |
61 | | - const navigate = useNavigate(); |
62 | 56 |
|
63 | 57 | const renderForm = (formProps: FormRenderProps) => { |
64 | 58 | const { handleSubmit, submitting, pristine, values } = formProps; |
@@ -130,26 +124,10 @@ export const LoginWithOAuthApp: FC = () => { |
130 | 124 |
|
131 | 125 | return ( |
132 | 126 | <div> |
133 | | - <div className="mx-8 mt-4 flex items-center justify-between py-2"> |
134 | | - <button |
135 | | - type="button" |
136 | | - className="focus:outline-none" |
137 | | - title="Go Back" |
138 | | - onClick={() => navigate(-1)} |
139 | | - > |
140 | | - <ArrowLeftIcon |
141 | | - size={20} |
142 | | - className="hover:text-gray-400" |
143 | | - aria-label="Go Back" |
144 | | - /> |
145 | | - </button> |
146 | | - |
147 | | - <h3 className="justify-center text-lg font-semibold"> |
148 | | - <PersonIcon size={20} className="mr-2" /> |
149 | | - Login with OAuth App |
150 | | - </h3> |
151 | | - </div> |
152 | | - |
| 127 | + <Header> |
| 128 | + <PersonIcon size={20} className="mr-2" /> |
| 129 | + Login with OAuth App |
| 130 | + </Header> |
153 | 131 | <div className="px-8"> |
154 | 132 | <Form |
155 | 133 | initialValues={{ |
|
0 commit comments