-
-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): add reset password page (#1961)
* feat(ui): add reset password form page add reset passsword form page * fix(ui): fix ut fix ut * fix(ui): fix ut typo fix ut typo
- Loading branch information
Showing
10 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@use '@/scss/underscore' as _; | ||
|
||
.wrapper { | ||
@include _.full-page; | ||
} | ||
|
||
.container { | ||
@include _.full-width; | ||
margin-top: _.unit(2); | ||
} | ||
|
||
.title { | ||
@include _.title; | ||
} | ||
|
||
:global(body.mobile) { | ||
.container { | ||
margin-top: _.unit(2); | ||
} | ||
|
||
.title { | ||
margin-bottom: _.unit(6); | ||
} | ||
} | ||
|
||
:global(body.desktop) { | ||
.container { | ||
margin-top: _.unit(12); | ||
} | ||
|
||
.title { | ||
font: var(--font-title-medium); | ||
margin-bottom: _.unit(4); | ||
} | ||
|
||
.description { | ||
font: var(--font-caption); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { render } from '@testing-library/react'; | ||
import { MemoryRouter, Routes, Route } from 'react-router-dom'; | ||
|
||
import ResetPassword from '.'; | ||
|
||
describe('ForgotPassword', () => { | ||
it('render reset-password page properly', () => { | ||
const { queryByText } = render( | ||
<MemoryRouter initialEntries={['/reset-password']}> | ||
<Routes> | ||
<Route path="/reset-password" element={<ResetPassword />} /> | ||
</Routes> | ||
</MemoryRouter> | ||
); | ||
|
||
expect(queryByText('description.new_password')).not.toBeNull(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
import NavBar from '@/components/NavBar'; | ||
|
||
import * as styles from './index.module.scss'; | ||
|
||
const ResetPassword = () => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div className={styles.wrapper}> | ||
<NavBar /> | ||
<div className={styles.container}> | ||
<div className={styles.title}>{t('description.new_password')}</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ResetPassword; |