feat: add checkboxes for dogs allowed and fumoire

main
RaviAnand Mohabir 3 months ago
parent ac318177d4
commit f1bd80ce77

@ -1,7 +1,10 @@
import { Container } from "@styled-system/jsx";
import { Cigarette, PawPrint } from "lucide-react";
import { Container, HStack, Stack } from "@styled-system/jsx";
import { Metadata } from "next";
import { Params } from "../shared";
import RichText from "@/components/rich-text";
import { Text } from "@/components/ui/text";
import { getAbout } from "@/api";
import { getI18n } from "@/i18n/server";
@ -11,7 +14,23 @@ export default async function About({ params: { locale } }: { params: Params })
return (
<Container pt={6}>
<Stack gap={10}>
<RichText content={about.text!} />
<Stack>
{about.dogsAllowed && (
<HStack alignItems="center">
<PawPrint />
<Text>{t("about.dogsAllowed")}</Text>
</HStack>
)}
{about.fumoire && (
<HStack alignItems="center">
<Cigarette />
<Text>{t("about.fumoire")}</Text>
</HStack>
)}
</Stack>
</Stack>
</Container>
);
}

@ -21,5 +21,15 @@ export const About: GlobalConfig = {
type: "richText",
localized: true,
},
{
name: "dogsAllowed",
type: "checkbox",
required: true,
},
{
name: "fumoire",
type: "checkbox",
required: true,
},
],
};

@ -22,4 +22,8 @@ export default {
"5": "Samstag",
"6": "Sonntag",
},
about: {
dogsAllowed: "Hunde erlaubt",
fumoire: "Fumoire verfügbar",
},
} as const;

@ -7,6 +7,7 @@ export default {
address: "Address",
email: "Email",
openingTimes: "Opening Times",
phoneNumber: "Phone",
en: "English",
de: "German",
fr: "French",
@ -21,4 +22,8 @@ export default {
"5": "Saturday",
"6": "Sunday",
},
about: {
dogsAllowed: "Dogs allowed",
fumoire: "Fumoire available",
},
} as const;

@ -318,6 +318,8 @@ export interface About {
};
[k: string]: unknown;
} | null;
dogsAllowed: boolean;
fumoire: boolean;
updatedAt?: string | null;
createdAt?: string | null;
}

Loading…
Cancel
Save