mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-12-05 17:30:50 +00:00
Edit Carousel
Took 1 hour 41 minutes
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
Card,
|
||||
Flex,
|
||||
Box,
|
||||
Image,
|
||||
Text,
|
||||
Button,
|
||||
VStack,
|
||||
Spacer,
|
||||
} from '@chakra-ui/react';
|
||||
import {useRouter} from 'next/router';
|
||||
import {AiFillMessage} from 'react-icons/ai';
|
||||
import {BsFillPersonFill} from 'react-icons/bs';
|
||||
import LeftPanelButton
|
||||
from '@/components/layout/dashboard/left_panel/LeftPanelButton';
|
||||
|
||||
export default function LeftPanel(props) {
|
||||
const router = useRouter();
|
||||
const {user} = props;
|
||||
|
||||
return (
|
||||
<Card width={'20vw'} height={'100vh'} padding={'0px'}>
|
||||
<Flex direction={'column'} height={'100%'} margin={'10%'}>
|
||||
<Box>
|
||||
<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'}>
|
||||
"{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')}>
|
||||
Messages
|
||||
</LeftPanelButton>
|
||||
<LeftPanelButton leftIcon={<BsFillPersonFill/>}
|
||||
onClickHandler={() => router.push('/dashboard')}>
|
||||
Profile
|
||||
</LeftPanelButton>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import {Button} from '@chakra-ui/react';
|
||||
import {ReactJSXElement} from '@emotion/react/types/jsx-namespace';
|
||||
|
||||
type Props = {
|
||||
children?: ReactJSXElement
|
||||
onClickHandler: () => void
|
||||
leftIcon ?: ReactJSXElement
|
||||
}
|
||||
|
||||
export default function LeftPanelButton(props: Props) {
|
||||
const {children, onClickHandler, leftIcon: icon} = props;
|
||||
|
||||
return (
|
||||
<Button
|
||||
colorScheme={'purple'}
|
||||
variant={'ghost'}
|
||||
width={'100%'}
|
||||
justifyContent={'left'}
|
||||
onClick={onClickHandler}
|
||||
leftIcon={icon}
|
||||
fontWeight={'bold'}
|
||||
fontSize={'1.2rem'}
|
||||
>{children}</Button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user