mirror of
https://github.com/DerTyp7/apartment-altenau-nextjs.git
synced 2025-10-29 12:52:12 +01:00
f
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
import styles from "../styles/Privacy.module.scss";
|
||||
import { db } from "../firebase-config";
|
||||
import { collection, doc, getDoc, getDocs } from "firebase/firestore";
|
||||
|
||||
export default function Privacy() {
|
||||
export async function getInitialProps({ router }) {
|
||||
let pageProps = {};
|
||||
const { locale } = router;
|
||||
|
||||
return { pageProps, locale };
|
||||
}
|
||||
|
||||
export async function getServerSideProps({ locale }) {
|
||||
const data = await getDoc(doc(db, "localeTexts", locale));
|
||||
|
||||
return {
|
||||
props: { localeTexts: data.data() ?? {} },
|
||||
};
|
||||
}
|
||||
export default function Privacy({ localeTexts }) {
|
||||
return (
|
||||
<div className={styles.privacy}>
|
||||
<h1>Privacy</h1>
|
||||
<div className="legalAndPrivayContainer">
|
||||
<h1>{localeTexts?.privacy?.headline}</h1>
|
||||
<div
|
||||
className="content"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: localeTexts?.privacy?.content,
|
||||
}}
|
||||
></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user