feat: add checkboxes for dogs allowed and fumoire

main
RaviAnand Mohabir 3 weeks 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 { Metadata } from "next";
import { Params } from "../shared"; import { Params } from "../shared";
import RichText from "@/components/rich-text"; import RichText from "@/components/rich-text";
import { Text } from "@/components/ui/text";
import { getAbout } from "@/api"; import { getAbout } from "@/api";
import { getI18n } from "@/i18n/server"; import { getI18n } from "@/i18n/server";
@ -11,7 +14,23 @@ export default async function About({ params: { locale } }: { params: Params })
return ( return (
<Container pt={6}> <Container pt={6}>
<RichText content={about.text!} /> <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> </Container>
); );
} }

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

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

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

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

Loading…
Cancel
Save