mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-12-05 17:30:50 +00:00
fonctionnalités de la page Profile user
This commit is contained in:
@@ -1,53 +1,62 @@
|
||||
import {
|
||||
Card,
|
||||
Flex,
|
||||
Box,
|
||||
Image,
|
||||
Text,
|
||||
Spacer,
|
||||
} from '@chakra-ui/react';
|
||||
import {useRouter} from 'next/router';
|
||||
import { Card, Flex, Box, Image, Text, Spacer } from "@chakra-ui/react";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import {AiFillMessage} from 'react-icons/ai';
|
||||
import {BsFillPersonFill} from 'react-icons/bs';
|
||||
import {BiLogOut} from 'react-icons/bi';
|
||||
import { AiFillMessage } from "react-icons/ai";
|
||||
import { BsFillPersonFill } from "react-icons/bs";
|
||||
import { BiLogOut } from "react-icons/bi";
|
||||
|
||||
import LeftPanelButton
|
||||
from '@/components/layout/dashboard/left_panel/LeftPanelButton';
|
||||
import {signOut} from 'next-auth/react';
|
||||
import LeftPanelButton from "@/components/layout/dashboard/left_panel/LeftPanelButton";
|
||||
import { signOut } from "next-auth/react";
|
||||
|
||||
export default function LeftPanel(props) {
|
||||
const router = useRouter();
|
||||
const {user} = props;
|
||||
const { user } = props;
|
||||
|
||||
return (
|
||||
<Card width={'20vw'} height={'100%'} borderRadius={0} padding={'0px'} bg={'#faf9ff'}>
|
||||
<Flex direction={'column'} height={'100%'} margin={'10%'}>
|
||||
<Card
|
||||
width={"20vw"}
|
||||
height={"100%"}
|
||||
borderRadius={0}
|
||||
padding={"0px"}
|
||||
bg={"#faf9ff"}
|
||||
>
|
||||
<Flex direction={"column"} height={"100%"} margin={"10%"}>
|
||||
<Box>
|
||||
<Image src={user.images[0]} borderRadius={'1rem'}/>
|
||||
<Box mt={'1vh'}>
|
||||
<Text fontSize={'1.5rem'} fontWeight={'bold'}>
|
||||
<Image src={user.images[0]} borderRadius={"1rem"} />
|
||||
<Box mt={"1vh"}>
|
||||
<Text fontSize={"1.5rem"} fontWeight={"bold"}>
|
||||
{user.firstName} {user.lastName}
|
||||
</Text>
|
||||
<Text as="i" fontWeight={'bold'}>
|
||||
<Text as="i" fontWeight={"bold"}>
|
||||
"{user.aPropos}"
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
<Spacer/>
|
||||
<Flex gap={2} direction={'column'} mt={'1vh'} spacing={3.5}
|
||||
alignContent={'bottom'}>
|
||||
|
||||
<LeftPanelButton leftIcon={<AiFillMessage/>}
|
||||
onClickHandler={() => router.push('/dashboard')}>
|
||||
<Spacer />
|
||||
<Flex
|
||||
gap={2}
|
||||
direction={"column"}
|
||||
mt={"1vh"}
|
||||
spacing={3.5}
|
||||
alignContent={"bottom"}
|
||||
>
|
||||
<LeftPanelButton
|
||||
leftIcon={<AiFillMessage />}
|
||||
onClickHandler={() => router.push("/dashboard")}
|
||||
>
|
||||
Messages
|
||||
</LeftPanelButton>
|
||||
<LeftPanelButton leftIcon={<BsFillPersonFill/>}
|
||||
onClickHandler={() => router.push('/dashboard')}>
|
||||
<LeftPanelButton
|
||||
leftIcon={<BsFillPersonFill />}
|
||||
onClickHandler={() => router.push("/userProfile")}
|
||||
>
|
||||
Profile
|
||||
</LeftPanelButton>
|
||||
<LeftPanelButton variant={"outline"} leftIcon={<BiLogOut/>}
|
||||
onClickHandler={() => signOut({callbackUrl: "/"})}>
|
||||
<LeftPanelButton
|
||||
variant={"outline"}
|
||||
leftIcon={<BiLogOut />}
|
||||
onClickHandler={() => signOut({ callbackUrl: "/" })}
|
||||
>
|
||||
Deconnexion
|
||||
</LeftPanelButton>
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user