mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-05-16 17:21:54 +00:00
feat(Preferences): Choose preferences -- Fetch user from pref
This commit is contained in:
@@ -27,8 +27,11 @@ const Carousel = ({ images, borderRadius: bRadius }: Props) => {
|
||||
borderRadius={bRadius}
|
||||
overflow={"hidden"}
|
||||
justify={"space-between"}
|
||||
bgColor={"purple.50"}
|
||||
bgImage={images[currentIndex]}
|
||||
bgSize={"cover"}
|
||||
bgSize={"contain"}
|
||||
bgRepeat={"no-repeat"}
|
||||
bgPosition={"center"}
|
||||
width={"100%"}
|
||||
height={500}
|
||||
>
|
||||
|
||||
@@ -28,12 +28,9 @@ export default function CardUser(props) {
|
||||
setUserDislikes,
|
||||
} = props;
|
||||
|
||||
console.log(userLikes);
|
||||
console.log(userDislikes);
|
||||
|
||||
const toast = useToast({
|
||||
position: "top",
|
||||
duration: 3000,
|
||||
duration: 2000,
|
||||
isClosable: true,
|
||||
});
|
||||
const [listUsers, setListUsers] = useState(users);
|
||||
@@ -66,7 +63,6 @@ export default function CardUser(props) {
|
||||
title: "Erreur",
|
||||
description: "Une erreur est survenue",
|
||||
status: "error",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
onSuccess: (data) => {
|
||||
@@ -74,7 +70,6 @@ export default function CardUser(props) {
|
||||
title: "J'aime",
|
||||
description: "Votre action a bien été prise en compte",
|
||||
status: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -154,7 +149,7 @@ export default function CardUser(props) {
|
||||
return (
|
||||
<Card w={"100%"} h={"100%"} borderRadius={"1rem"} overflow={"hidden"}>
|
||||
<CardHeader>
|
||||
<Carousel borderRadius={"1rem"} images={listUsers[0].images} />
|
||||
<Carousel borderRadius={"1rem"} images={listUsers?.[0].images} />
|
||||
</CardHeader>
|
||||
|
||||
<CardBody>
|
||||
|
||||
@@ -39,7 +39,12 @@ export default function LeftPanel(props) {
|
||||
{user.images.length === 0 ? (
|
||||
<Image src={"/blank_profile_picture.webp"} borderRadius={"1rem"} />
|
||||
) : (
|
||||
<Image src={user.images[0]} borderRadius={"1rem"} />
|
||||
<Image
|
||||
src={user.images[0]}
|
||||
borderRadius={"1rem"}
|
||||
objectFit={"contain"}
|
||||
width={"100%"}
|
||||
/>
|
||||
)}
|
||||
<Box mt={"2rem"}>
|
||||
<Flex align={"center"} justifyContent="space-between" mb={"1rem"}>
|
||||
|
||||
Reference in New Issue
Block a user