diff --git a/client/src/app/(embed)/embed/page.tsx b/client/src/app/(embed)/embed/page.tsx index ff1e1633..7edfcfbb 100644 --- a/client/src/app/(embed)/embed/page.tsx +++ b/client/src/app/(embed)/embed/page.tsx @@ -1,9 +1,17 @@ +"use client"; import CountryDetail from "@/containers/countries/countries-detail"; +import Popup from "@/containers/popup"; + +import { useSyncCountry } from "@/app/store"; export default function EmbedPage() { + const [country] = useSyncCountry(); + return ( -
- -
+ +
+ +
+
); } diff --git a/client/src/app/api/auth/[...nextauth]/options.ts b/client/src/app/api/auth/[...nextauth]/options.ts index e5d2a6bc..0c72fb00 100644 --- a/client/src/app/api/auth/[...nextauth]/options.ts +++ b/client/src/app/api/auth/[...nextauth]/options.ts @@ -55,7 +55,9 @@ export const authOptions: AuthOptions = { if (sessionToken) { const now = new Date().getTime(); - const exp = decoded.iat ? decoded.iat * 1000 + SESSION_MAX_AGE * 1000 : 0; + const exp = decoded.iat + ? decoded.iat * 1000 + SESSION_MAX_AGE * 1000 + : SESSION_MAX_AGE * 1000; if (now < exp) { return { diff --git a/client/src/containers/popup/index.tsx b/client/src/containers/popup/index.tsx index 0d778b00..06250efc 100644 --- a/client/src/containers/popup/index.tsx +++ b/client/src/containers/popup/index.tsx @@ -9,7 +9,8 @@ import { cn } from "@/lib/classnames"; const Popup = ({ visibleKey, children, -}: PropsWithChildren<{ visibleKey: string | number | null }>): JSX.Element => { + className, +}: PropsWithChildren<{ visibleKey: string | number | null; className?: string }>): JSX.Element => { const [open, setOpen] = useState(false); const toggleOpen = () => setOpen((prev) => !prev); @@ -25,6 +26,7 @@ const Popup = ({ true, "-translate-x-full": !open && visibleKey, "translate-x-0": open && visibleKey, + [className || ""]: !!className, })} >