diff --git a/src/components/PageLayout/Authentication/Authentication.tsx b/src/components/PageLayout/Authentication/Authentication.tsx index e03d30de..97e72320 100644 --- a/src/components/PageLayout/Authentication/Authentication.tsx +++ b/src/components/PageLayout/Authentication/Authentication.tsx @@ -37,6 +37,7 @@ export const Authentication: FC = () => { } else { return (
+ Profil logout()}>Odhlásiť
) diff --git a/src/components/Profile/ProfileDetail.module.scss b/src/components/Profile/ProfileDetail.module.scss new file mode 100644 index 00000000..defc1ea7 --- /dev/null +++ b/src/components/Profile/ProfileDetail.module.scss @@ -0,0 +1,6 @@ +.label { + font-weight: bold; + text-transform: uppercase; + font-style: italic; + padding-right: .5rem; +} diff --git a/src/components/Profile/ProfileDetail.module.scss.d.ts b/src/components/Profile/ProfileDetail.module.scss.d.ts new file mode 100644 index 00000000..214131f0 --- /dev/null +++ b/src/components/Profile/ProfileDetail.module.scss.d.ts @@ -0,0 +1,9 @@ +export type Styles = { + label: string +} + +export type ClassNames = keyof Styles + +declare const styles: Styles + +export default styles diff --git a/src/components/Profile/ProfileDetail.tsx b/src/components/Profile/ProfileDetail.tsx new file mode 100644 index 00000000..ed11d9cd --- /dev/null +++ b/src/components/Profile/ProfileDetail.tsx @@ -0,0 +1,48 @@ +import {Stack, Typography} from '@mui/material' +import {useQuery} from '@tanstack/react-query' +import axios from 'axios' +import {FC} from 'react' + +import {Profile} from '@/types/api/personal' +import {AuthContainer} from '@/utils/AuthContainer' + +import styles from './ProfileDetail.module.scss' + +type ProfileLineInput = { + label: string + value?: string +} + +const ProfileLine: FC = ({label, value}) => { + return ( + // font-size: 30px podla designu + + {label} + {value} + + ) +} + +export const ProfileDetail: FC = () => { + const {isAuthed} = AuthContainer.useContainer() + + const {data} = useQuery({ + queryKey: ['personal', 'profiles', 'myprofile'], + queryFn: () => axios.get(`/api/personal/profiles/myprofile`), + enabled: isAuthed, + }) + const profile = data?.data + + return ( + + + {/* TODO: pockat na BE kym to posle v datach */} + + + {/* TODO: pockat na BE kym to posle v datach */} + + + + + ) +} diff --git a/src/pages/strom/profil/index.tsx b/src/pages/strom/profil/index.tsx new file mode 100644 index 00000000..96b9940f --- /dev/null +++ b/src/pages/strom/profil/index.tsx @@ -0,0 +1,12 @@ +import {NextPage} from 'next' + +import {PageLayout} from '@/components/PageLayout/PageLayout' +import {ProfileDetail} from '@/components/Profile/ProfileDetail' + +const Profil: NextPage = () => ( + + + +) + +export default Profil