diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index fd5e979..7ca23d2 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -174,18 +174,26 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element { {/* Background when navbar is opened */}
+
{ - appLayout.setMainPanelOpen(false); - appLayout.setSubPanelOpen(false); - }} - >
+ onClick={() => { + appLayout.setMainPanelOpen(false); + appLayout.setSubPanelOpen(false); + }} + >
+ {/* Sub panel */} {props.subPanel ? ( @@ -261,7 +269,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element { setState={appLayout.setLanguagePanelOpen} >

{props.langui.select_language}

-
+
{router.locales?.sort().map((locale) => (
diff --git a/src/components/Popup.tsx b/src/components/Popup.tsx index 808c101..c0fc59a 100644 --- a/src/components/Popup.tsx +++ b/src/components/Popup.tsx @@ -1,4 +1,5 @@ import { Dispatch, SetStateAction } from "react"; +import Button from "./Button"; export type PopupProps = { setState: Dispatch>; @@ -9,23 +10,29 @@ export type PopupProps = { export default function Popup(props: PopupProps): JSX.Element { return (
{ props.setState(false); }} />
+ {props.children}
diff --git a/src/pages/library/[slug].tsx b/src/pages/library/[slug].tsx index 3ac284a..73117d7 100644 --- a/src/pages/library/[slug].tsx +++ b/src/pages/library/[slug].tsx @@ -204,7 +204,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {

{langui.details}

{item.metadata.length > 0 ? ( -
+

{langui.type}

{prettyItemType(item.metadata[0], langui)} @@ -217,7 +217,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { )} {item.release_date ? ( -
+

{langui.release_date}

{prettyDate(item.release_date)}

@@ -226,11 +226,23 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { )} {item.price ? ( -
+

{langui.price}

- {prettyPrice(item.price, currencies, appLayout.currency)} + {prettyPrice( + item.price, + currencies, + item.price.currency.data.attributes.code + )}

+ {item.price.currency.data.attributes.code !== + appLayout.currency && ( +

+ {prettyPrice(item.price, currencies, appLayout.currency)}{" "} +
+ (calculated) +

+ )}
) : ( ""