new features
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
export interface IProfilePageProps {
|
||||
className?: string
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
.root {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 32px 16px;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
width: 100%;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.sectionTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.infoList {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.infoRow {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.infoLabel {
|
||||
color: var(--gray-11);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.infoValue {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import type { JSX } from "react"
|
||||
|
||||
import moment from "moment"
|
||||
import { FunctionComponent } from "react"
|
||||
|
||||
import {
|
||||
@@ -12,6 +11,7 @@ import {
|
||||
LogoutButton,
|
||||
} from "@features/profile"
|
||||
import api from "@shared/api"
|
||||
import { formatDate } from "@shared/lib/dates"
|
||||
import { useBreadcrumbs } from "@shared/context/BreadcrumbsContext"
|
||||
import { StaticLoader } from "@shared/ui/Loader"
|
||||
import { Card } from "@shared/ui"
|
||||
@@ -22,7 +22,7 @@ import styles from "./ProfilePage.module.scss"
|
||||
export const ProfilePage: FunctionComponent<
|
||||
IProfilePageProps
|
||||
> = (): JSX.Element => {
|
||||
useBreadcrumbs([{ label: "Profile" }])
|
||||
useBreadcrumbs([{ label: "Профиль" }])
|
||||
|
||||
const {
|
||||
data: user,
|
||||
@@ -82,7 +82,7 @@ export const ProfilePage: FunctionComponent<
|
||||
<div className={styles.infoRow}>
|
||||
<span className={styles.infoLabel}>Дата регистрации</span>
|
||||
<span className={styles.infoValue}>
|
||||
{moment(user.date_joined).format("DD.MM.YYYY")}
|
||||
{formatDate(user.date_joined)}
|
||||
</span>
|
||||
</div>
|
||||
<div className={styles.infoRow}>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./ProfilePage"
|
||||
Reference in New Issue
Block a user