mirror of
https://github.com/DerTyp7/apartment-altenau-nextjs.git
synced 2025-10-28 20:32:13 +01:00
30 lines
761 B
JavaScript
30 lines
761 B
JavaScript
import styles from "../styles/Pricing.module.scss";
|
|
import { useRouter } from "next/router";
|
|
import { useSearchParams } from "next/navigation";
|
|
import { collection, doc, getDoc, getDocs } from "firebase/firestore";
|
|
import { db } from "../firebase-config";
|
|
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() ?? {} },
|
|
};
|
|
}
|
|
|
|
function Pricing({ localeTexts }) {
|
|
return (
|
|
<div className={styles.pricing}>
|
|
<h1 className="pageHeadline">{localeTexts?.pricing?.headline}</h1>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Pricing;
|