Skip to content

Commit e924180

Browse files
committed
Stack privacy popup and search hint
1 parent 460e89b commit e924180

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

components/privacy/popup.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { Box, VStack, Text, HStack, Button, Link, useColorModeValue, Fade } from "@chakra-ui/react"
1+
import { Box, VStack, Text, HStack, Button, Link, useColorModeValue, Fade, useToast } from "@chakra-ui/react"
22
import { usePrivacyStore } from "@/store/privacy"
33
import { useEffect } from "react"
44
import { useTranslations } from "next-intl"
55

66
const PrivacyPopup: React.FC = () => {
77
const { initialized, showPopup, init, accept, decline } = usePrivacyStore()
88
const t = useTranslations("common")
9+
const toast = useToast()
10+
11+
const isToastActive = toast.isActive("search-hint")
912

1013
const bg = useColorModeValue("white", "gray.800")
1114
const textColor = useColorModeValue("gray.700", "gray.200")
@@ -19,7 +22,7 @@ const PrivacyPopup: React.FC = () => {
1922
<Fade in={showPopup} unmountOnExit>
2023
<Box
2124
position="fixed"
22-
bottom={{ base: 4, md: 6 }}
25+
bottom={isToastActive ? { base: 20, md: 24 } : { base: 4, md: 6 }}
2326
right={{ base: 4, md: 6 }}
2427
bg={bg}
2528
color={textColor}

0 commit comments

Comments
 (0)