-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Сделал страницу смены E-mail и подключил к API
- Loading branch information
1 parent
f8968a5
commit 29d771d
Showing
15 changed files
with
467 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@use '../../shared/styles/utils/mixins' as media; | ||
@use '../../shared/styles/utils/variables' as color; | ||
|
||
.changeEmailPage { | ||
width: 100%; | ||
|
||
&__pageDescriptor { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
} | ||
|
||
&__container { | ||
width: 100%; | ||
display: flex; | ||
justify-content: start; | ||
align-items: start; | ||
gap: 20px; | ||
|
||
@include media.respond-to('large') { | ||
flex-direction: column; | ||
gap: 10px; | ||
} | ||
} | ||
|
||
&__contentContainer { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 50px; | ||
} | ||
} |
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,61 @@ | ||
import { FC, Suspense, useState } from 'react' | ||
|
||
import SideBarMenuModal from '@/features/SideBarMenuModal' | ||
import { Routes } from '@/shared/config/routerConfig/routes' | ||
import { useResize } from '@/shared/libs/hooks/useResize' | ||
import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs' | ||
import Heading from '@/shared/ui/Heading/Heading' | ||
import Modal from '@/shared/ui/Modal/Modal' | ||
import Spinner from '@/shared/ui/Spinner/Spinner' | ||
import WrapperForMainContent from '@/shared/ui/WrapperForMainContent/WrapperForMainContent' | ||
import { ChangeEmail } from '@/widgets/ChangeEmail/ChangeEmail' | ||
import { withAdaptiveSideBar } from '@/widgets/SideBarMenu' | ||
|
||
import styles from './ChangeEmailPage.module.scss' | ||
|
||
const links = [ | ||
{ heading: 'Главная', href: '/' }, | ||
{ heading: 'Личный Кабинет', href: Routes.ACCOUNT }, | ||
{ heading: 'Изменить E-Mail', href: '' } | ||
] | ||
|
||
export const ChangeEmailPage: FC = () => { | ||
const { isScreenLg } = useResize() | ||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false) | ||
const [isModalClosing, setIsModalClosing] = useState<boolean>(false) | ||
const AdaptiveSideBar = withAdaptiveSideBar(isScreenLg) | ||
|
||
const handleClick = () => { | ||
setIsModalOpen(true) | ||
} | ||
|
||
const changeModalState = () => { | ||
setIsModalOpen(!isModalOpen) | ||
} | ||
|
||
return ( | ||
<WrapperForMainContent> | ||
<div className={styles.changeEmailPage__pageDescriptor}> | ||
<Heading>Изменить E-Mail</Heading> | ||
<Breadcrumbs links={links} /> | ||
</div> | ||
<div className={styles.changeEmailPage__container}> | ||
<AdaptiveSideBar handleClick={handleClick} /> | ||
<div className={styles.changeEmailPage__contentContainer}> | ||
<ChangeEmail /> | ||
</div> | ||
</div> | ||
{isModalOpen && ( | ||
<Modal | ||
isModalOpen={isModalOpen} | ||
onClose={changeModalState} | ||
isModalClosing={isModalClosing} | ||
setIsModalClosing={setIsModalClosing}> | ||
<Suspense fallback={<Spinner />}> | ||
<SideBarMenuModal handleClose={changeModalState} /> | ||
</Suspense> | ||
</Modal> | ||
)} | ||
</WrapperForMainContent> | ||
) | ||
} |
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,88 @@ | ||
@use '../../shared/styles/utils/variables' as color; | ||
|
||
@mixin font($size) { | ||
font-size: $size; | ||
font-weight: 500; | ||
line-height: 1.5; | ||
} | ||
|
||
.changePasswordform { | ||
width: 100%; | ||
min-height: 400px; | ||
padding: 30px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
gap: 20px; | ||
background-color: color.$white; | ||
border-radius: 5px; | ||
|
||
&__header { | ||
font-size: 20px; | ||
line-height: 1; | ||
font-weight: 700; | ||
} | ||
|
||
&__form { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
gap: 20px; | ||
} | ||
|
||
&__label { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
} | ||
|
||
&__fieldlabel { | ||
@include font(14px); | ||
} | ||
|
||
&__field { | ||
width: 100%; | ||
padding: 10px 16px; | ||
border: none; | ||
outline: none; | ||
background-color: color.$body-bg; | ||
border-radius: 5px; | ||
box-shadow: none; | ||
@include font(14px); | ||
|
||
transition: box-shadow 0.5s; | ||
|
||
&:focus { | ||
box-shadow: 0 0 0 2px color.$theme-primary-color; | ||
} | ||
|
||
&_textfield { | ||
min-height: 100px; | ||
} | ||
} | ||
|
||
&__btnConteiner { | ||
width: 50%; | ||
display: flex; | ||
gap: 10px; | ||
} | ||
|
||
&__submitbtn { | ||
width: 100%; | ||
transition: opacity 0.5s; | ||
|
||
&:hover { | ||
opacity: 0.8; | ||
} | ||
} | ||
|
||
&__msg { | ||
font-size: 18px; | ||
line-height: 25px; | ||
font-weight: 400; | ||
} | ||
} |
Oops, something went wrong.