diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index bf6c1ed..d1751be 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -12,6 +12,7 @@ import { useMediaCoarse, useMediaMobile } from "hooks/useMediaQuery"; import ReactTooltip from "react-tooltip"; import { useAppLayout } from "contexts/AppLayoutContext"; import { ImageQuality } from "./Img"; +import Popup from "./Popup"; type AppLayoutProps = { subPanel?: React.ReactNode; @@ -218,37 +219,25 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element { - {/* Language selection background */} -
{ - appLayout.setLanguagePanelOpen(false); - }} + -
-

{props.langui.select_language}

-
- {router.locales?.sort().map((locale) => ( - - ))} -
+

{props.langui.select_language}

+
+ {router.locales?.sort().map((locale) => ( + + ))}
-
+
>; + state?: boolean; + children: React.ReactNode; +}; + +export default function Popup(props: PopupProps): JSX.Element { + return ( +
+
{ + props.setState(false); + }} + /> +
+ {props.children} +
+
+ ); +}