mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
prettier all the things
This commit is contained in:
committed by
Thomas Ruoff
parent
c35d3009c6
commit
36f8719531
@@ -1,6 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useEffect } from 'react'
|
||||
|
||||
import { useSession, signIn, SessionProvider } from "next-auth/react"
|
||||
import { useSession, signIn, SessionProvider } from 'next-auth/react'
|
||||
import '../styles/index.css'
|
||||
|
||||
function Auth({ children }) {
|
||||
@@ -21,8 +21,10 @@ function Auth({ children }) {
|
||||
return <div>Loading...</div>
|
||||
}
|
||||
|
||||
export default function MyApp({ Component, pageProps: { session, ...pageProps } }) {
|
||||
|
||||
export default function MyApp({
|
||||
Component,
|
||||
pageProps: { session, ...pageProps },
|
||||
}) {
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
<SessionProvider session={session}>
|
||||
@@ -37,4 +39,3 @@ export default function MyApp({ Component, pageProps: { session, ...pageProps }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export const getServerSideProps = async (context) => {
|
||||
...serverSideBookingProps.props,
|
||||
milageMax,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const milageTarifOptions = Object.values(MILAGE_TARIFS).map((tarif) => {
|
||||
@@ -134,135 +134,133 @@ function BookingBillPage({
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
{booking && (
|
||||
<form className="w-full" onSubmit={onSubmit}>
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong>{' '}
|
||||
{daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Bucher:</strong> {booking.name}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong>{' '}
|
||||
{getBookingStatus(booking.status)}
|
||||
</div>
|
||||
<div>
|
||||
<Input
|
||||
label="Anfangskilometer"
|
||||
name="milageStart"
|
||||
required
|
||||
value={milageStart}
|
||||
type="number"
|
||||
onChange={(e: React.ChangeEvent<React.ElementRef<'input'>>) =>
|
||||
setMilageStart(Number(e.target.value))
|
||||
}
|
||||
/>
|
||||
<Input
|
||||
label="Endkilometer"
|
||||
name="milageEnd"
|
||||
required
|
||||
value={milageEnd}
|
||||
type="number"
|
||||
onChange={(e: React.ChangeEvent<React.ElementRef<'input'>>) =>
|
||||
setMilageEnd(Number(e.target.value))
|
||||
}
|
||||
/>
|
||||
<Input label="Gefahren" name="milage" readOnly value={milage} />
|
||||
<Select
|
||||
label="Rate"
|
||||
name="tarif"
|
||||
value={tarif}
|
||||
onChange={(e) => setTarif(e.target.value as MILAGE_TARIFS)}
|
||||
>
|
||||
{milageTarifOptions}
|
||||
</Select>
|
||||
<div className="mb-3">
|
||||
<button
|
||||
className="ibtn btn-gray mr-3"
|
||||
onClick={onAddAdditionalCost}
|
||||
title="Zusätzliche Kosten hinzufügen"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
<label className="flabel inline">Zusätzliche Kosten</label>
|
||||
</div>
|
||||
{additionalCosts.map((_, index) => {
|
||||
return (
|
||||
<>
|
||||
<div className="mb-3" key={`label${index}`}>
|
||||
<button
|
||||
className="ibtn btn-gray mr-3"
|
||||
onClick={(event) =>
|
||||
onRemoveAdditionalCost(event, index)
|
||||
}
|
||||
title="Entfernen"
|
||||
>
|
||||
-
|
||||
</button>
|
||||
<label className="flabel inline">{`Kostenpunkt ${index + 1
|
||||
}`}</label>
|
||||
</div>
|
||||
<div className="ml-10 mb-3" key={`input{index}`}>
|
||||
<Input
|
||||
label={`Name`}
|
||||
name={`additionalCostName${index}`}
|
||||
key={`additionalCostName${index}`}
|
||||
value={additionalCosts[index].name}
|
||||
onChange={(event) => {
|
||||
const newAdditonalCosts = [...additionalCosts]
|
||||
newAdditonalCosts[index] = {
|
||||
value: newAdditonalCosts[index].value,
|
||||
name: event.target.value,
|
||||
}
|
||||
setAdditionalCosts(newAdditonalCosts)
|
||||
}}
|
||||
/>
|
||||
<Input
|
||||
label={`Betrag`}
|
||||
name={`additionalCostValue${index}`}
|
||||
key={`additionalCostValue${index}`}
|
||||
value={additionalCosts[index].value}
|
||||
type="number"
|
||||
onChange={(event) => {
|
||||
const newAdditonalCosts = [...additionalCosts]
|
||||
newAdditonalCosts[index] = {
|
||||
name: newAdditonalCosts[index].name,
|
||||
value: Number(event.target.value),
|
||||
}
|
||||
setAdditionalCosts(newAdditonalCosts)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
})}
|
||||
<Input label="Summe" name="total" readOnly value={total} />
|
||||
</div>
|
||||
{booking && (
|
||||
<form className="w-full" onSubmit={onSubmit}>
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong>{' '}
|
||||
{daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Bucher:</strong> {booking.name}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
</div>
|
||||
<div>
|
||||
<Input
|
||||
label="Anfangskilometer"
|
||||
name="milageStart"
|
||||
required
|
||||
value={milageStart}
|
||||
type="number"
|
||||
onChange={(e: React.ChangeEvent<React.ElementRef<'input'>>) =>
|
||||
setMilageStart(Number(e.target.value))
|
||||
}
|
||||
/>
|
||||
<Input
|
||||
label="Endkilometer"
|
||||
name="milageEnd"
|
||||
required
|
||||
value={milageEnd}
|
||||
type="number"
|
||||
onChange={(e: React.ChangeEvent<React.ElementRef<'input'>>) =>
|
||||
setMilageEnd(Number(e.target.value))
|
||||
}
|
||||
/>
|
||||
<Input label="Gefahren" name="milage" readOnly value={milage} />
|
||||
<Select
|
||||
label="Status"
|
||||
name={status}
|
||||
value={status}
|
||||
onChange={(e) => setStatus(e.target.value as BILL_STATUS)}
|
||||
label="Rate"
|
||||
name="tarif"
|
||||
value={tarif}
|
||||
onChange={(e) => setTarif(e.target.value as MILAGE_TARIFS)}
|
||||
>
|
||||
{billStatusOptions}
|
||||
{milageTarifOptions}
|
||||
</Select>
|
||||
{storingError && (
|
||||
<div className="error-message flex-grow mt-6">{storingError}</div>
|
||||
)}
|
||||
<button
|
||||
type="submit"
|
||||
className="btn btn-blue mt-3"
|
||||
disabled={storingInProgress}
|
||||
>
|
||||
Rechnung {!!booking.bill ? 'Updaten' : 'Erstellen'}
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
<div className="mb-3">
|
||||
<button
|
||||
className="ibtn btn-gray mr-3"
|
||||
onClick={onAddAdditionalCost}
|
||||
title="Zusätzliche Kosten hinzufügen"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
<label className="flabel inline">Zusätzliche Kosten</label>
|
||||
</div>
|
||||
{additionalCosts.map((_, index) => {
|
||||
return (
|
||||
<>
|
||||
<div className="mb-3" key={`label${index}`}>
|
||||
<button
|
||||
className="ibtn btn-gray mr-3"
|
||||
onClick={(event) => onRemoveAdditionalCost(event, index)}
|
||||
title="Entfernen"
|
||||
>
|
||||
-
|
||||
</button>
|
||||
<label className="flabel inline">{`Kostenpunkt ${
|
||||
index + 1
|
||||
}`}</label>
|
||||
</div>
|
||||
<div className="ml-10 mb-3" key={`input{index}`}>
|
||||
<Input
|
||||
label={`Name`}
|
||||
name={`additionalCostName${index}`}
|
||||
key={`additionalCostName${index}`}
|
||||
value={additionalCosts[index].name}
|
||||
onChange={(event) => {
|
||||
const newAdditonalCosts = [...additionalCosts]
|
||||
newAdditonalCosts[index] = {
|
||||
value: newAdditonalCosts[index].value,
|
||||
name: event.target.value,
|
||||
}
|
||||
setAdditionalCosts(newAdditonalCosts)
|
||||
}}
|
||||
/>
|
||||
<Input
|
||||
label={`Betrag`}
|
||||
name={`additionalCostValue${index}`}
|
||||
key={`additionalCostValue${index}`}
|
||||
value={additionalCosts[index].value}
|
||||
type="number"
|
||||
onChange={(event) => {
|
||||
const newAdditonalCosts = [...additionalCosts]
|
||||
newAdditonalCosts[index] = {
|
||||
name: newAdditonalCosts[index].name,
|
||||
value: Number(event.target.value),
|
||||
}
|
||||
setAdditionalCosts(newAdditonalCosts)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
})}
|
||||
<Input label="Summe" name="total" readOnly value={total} />
|
||||
</div>
|
||||
<Select
|
||||
label="Status"
|
||||
name={status}
|
||||
value={status}
|
||||
onChange={(e) => setStatus(e.target.value as BILL_STATUS)}
|
||||
>
|
||||
{billStatusOptions}
|
||||
</Select>
|
||||
{storingError && (
|
||||
<div className="error-message flex-grow mt-6">{storingError}</div>
|
||||
)}
|
||||
<button
|
||||
type="submit"
|
||||
className="btn btn-blue mt-3"
|
||||
disabled={storingInProgress}
|
||||
>
|
||||
Rechnung {!!booking.bill ? 'Updaten' : 'Erstellen'}
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
BookingBillPage.auth = true;
|
||||
BookingBillPage.auth = true
|
||||
|
||||
export default BookingBillPage;
|
||||
export default BookingBillPage
|
||||
|
||||
@@ -9,13 +9,9 @@ import { getBookingStatus, patchBooking } from '../../../../helpers/booking'
|
||||
import { daysFormatFrontend } from '../../../../helpers/date'
|
||||
import { BOOKING_STATUS } from '../../../../db/enums'
|
||||
|
||||
export const getServerSideProps = getServerSideBooking;
|
||||
export const getServerSideProps = getServerSideBooking
|
||||
|
||||
function ShowBookingAdmin({
|
||||
booking: bookingProp,
|
||||
}: {
|
||||
booking: Booking
|
||||
}) {
|
||||
function ShowBookingAdmin({ booking: bookingProp }: { booking: Booking }) {
|
||||
const router = useRouter()
|
||||
const [booking, setBooking] = useState(bookingProp)
|
||||
const [storingBooking, setStoringBooking] = useState(false)
|
||||
@@ -41,43 +37,43 @@ function ShowBookingAdmin({
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<h2 className="text-3xl">Buchung {booking.uuid}</h2>
|
||||
<Calendar start={booking.startDate} end={booking.endDate} />
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Bucher:</strong> {booking.name}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
</div>
|
||||
{storingBookingError && (
|
||||
<div className="error-message flex-grow">{storingBookingError}</div>
|
||||
)}
|
||||
<div className="my-6">
|
||||
<button
|
||||
onClick={() => onStoreBooking(true)}
|
||||
className="btn btn-blue"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Bestätigen
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onStoreBooking(false)}
|
||||
className="btn btn-red"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Abweisen
|
||||
</button>
|
||||
<Link href={`${router.asPath}/bill`}>
|
||||
<a className="btn btn-gray">Rechnung</a>
|
||||
</Link>
|
||||
</div>
|
||||
<h2 className="text-3xl">Buchung {booking.uuid}</h2>
|
||||
<Calendar start={booking.startDate} end={booking.endDate} />
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Bucher:</strong> {booking.name}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
</div>
|
||||
{storingBookingError && (
|
||||
<div className="error-message flex-grow">{storingBookingError}</div>
|
||||
)}
|
||||
<div className="my-6">
|
||||
<button
|
||||
onClick={() => onStoreBooking(true)}
|
||||
className="btn btn-blue"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Bestätigen
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onStoreBooking(false)}
|
||||
className="btn btn-red"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Abweisen
|
||||
</button>
|
||||
<Link href={`${router.asPath}/bill`}>
|
||||
<a className="btn btn-gray">Rechnung</a>
|
||||
</Link>
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
ShowBookingAdmin.auth = true;
|
||||
ShowBookingAdmin.auth = true
|
||||
|
||||
export default ShowBookingAdmin;
|
||||
export default ShowBookingAdmin
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import React from 'react'
|
||||
import Link from 'next/link'
|
||||
import { useSession } from 'next-auth/react'
|
||||
import Layout from '../../components/layout';
|
||||
import Denied from '../../components/denied';
|
||||
import Layout from '../../components/layout'
|
||||
import Denied from '../../components/denied'
|
||||
import { daysFormatFrontend } from '../../helpers/date'
|
||||
|
||||
import { getServerSideRecentBookings } from '../../lib/getServerSideProps'
|
||||
|
||||
export const getServerSideProps = getServerSideRecentBookings;
|
||||
export const getServerSideProps = getServerSideRecentBookings
|
||||
|
||||
function AdminRecentBookings({ bookings }) {
|
||||
const { data: session, status} = useSession();
|
||||
const { data: session, status } = useSession()
|
||||
|
||||
if (typeof window !== 'undefined' && status === "loading") return null;
|
||||
if (typeof window !== 'undefined' && status === 'loading') return null
|
||||
|
||||
if (!bookings) return null;
|
||||
if (!bookings) return null
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
@@ -71,4 +71,4 @@ function AdminRecentBookings({ bookings }) {
|
||||
|
||||
AdminRecentBookings.auth = true
|
||||
|
||||
export default AdminRecentBookings;
|
||||
export default AdminRecentBookings
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import NextAuth from "next-auth"
|
||||
import EmailProvider from "next-auth/providers/email"
|
||||
import NextAuth from 'next-auth'
|
||||
import EmailProvider from 'next-auth/providers/email'
|
||||
|
||||
import { MongoDBAdapter } from "@next-auth/mongodb-adapter"
|
||||
import { MONGO_URI, MONGODB_OPTIONS } from "../../../db"
|
||||
import { MongoClient } from "mongodb";
|
||||
import { MongoDBAdapter } from '@next-auth/mongodb-adapter'
|
||||
import { MONGO_URI, MONGODB_OPTIONS } from '../../../db'
|
||||
import { MongoClient } from 'mongodb'
|
||||
|
||||
let client: MongoClient;
|
||||
let client: MongoClient
|
||||
|
||||
async function getMongoClient() {
|
||||
if (!client) {
|
||||
client = new MongoClient(MONGO_URI, MONGODB_OPTIONS);
|
||||
await client.connect();
|
||||
client = new MongoClient(MONGO_URI, MONGODB_OPTIONS)
|
||||
await client.connect()
|
||||
}
|
||||
|
||||
return client;
|
||||
return client
|
||||
}
|
||||
|
||||
export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
@@ -24,17 +24,15 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
providers: [
|
||||
EmailProvider({
|
||||
server: {
|
||||
host: "smtp.sendgrid.net",
|
||||
host: 'smtp.sendgrid.net',
|
||||
port: 587,
|
||||
auth: {
|
||||
user: "apikey",
|
||||
user: 'apikey',
|
||||
pass: process.env.SENDGRID_API_KEY,
|
||||
},
|
||||
},
|
||||
from: process.env.FROM_EMAIL
|
||||
from: process.env.FROM_EMAIL,
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Bill } from '../../../../db/bill'
|
||||
import { createBill, patchBill } from '../../../../db/index'
|
||||
|
||||
export default async function billHandler(req, res): Promise<void> {
|
||||
|
||||
const {
|
||||
method,
|
||||
query: { uuid: uuids },
|
||||
|
||||
@@ -41,28 +41,28 @@ export default function ShowBooking({
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
{storingBookingError && (
|
||||
<div className="error-message flex-grow">{storingBookingError}</div>
|
||||
)}
|
||||
{[BOOKING_STATUS.CONFIRMED, BOOKING_STATUS.REQUESTED].includes(
|
||||
booking.status
|
||||
) && (
|
||||
<div className="my-6">
|
||||
<button
|
||||
onClick={onCancelBooking}
|
||||
className="btn btn-red"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Stornieren
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
{storingBookingError && (
|
||||
<div className="error-message flex-grow">{storingBookingError}</div>
|
||||
)}
|
||||
{[BOOKING_STATUS.CONFIRMED, BOOKING_STATUS.REQUESTED].includes(
|
||||
booking.status
|
||||
) && (
|
||||
<div className="my-6">
|
||||
<button
|
||||
onClick={onCancelBooking}
|
||||
className="btn btn-red"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Stornieren
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</Layout>
|
||||
)}
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -20,37 +20,38 @@ export default function ShowBookingStored({ booking }: { booking: Booking }) {
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<h3 className="thanks mb-3 mt-6 text-lg">Vielen Dank für die Buchungsanfrage</h3>
|
||||
<p className="mb-6">
|
||||
Nach Prüfung bestätigen wir die Buchung zeitnah per E-Mail.
|
||||
</p>
|
||||
<p>
|
||||
Den{' '}
|
||||
<Link href={`/bookings/${booking.uuid}`}>
|
||||
<a className="link underline">Link</a>
|
||||
</Link>{' '}
|
||||
zur Buchung schicken wir Dir auch per E-Mail. Dort kann die Buchung
|
||||
auch jederzeit storniert werden.
|
||||
</p>
|
||||
{!storedBookingData && !bookingDataStored && (
|
||||
<div className="mt-6">
|
||||
<p>
|
||||
Sollen deine Buchungsdaten für die nächste Buchung in{' '}
|
||||
<strong>deinem Browser</strong> gespeichert werden?
|
||||
</p>
|
||||
<button onClick={store} className="mt-3 ml-0 btn btn-blue">
|
||||
Ja, bitte speichern
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
{bookingDataStored === true && (
|
||||
<div className="mt-6">
|
||||
<p className="info-message">
|
||||
Ok, deine Buchungsdaten wurden für die nächste Buchung
|
||||
gespeichert.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</Layout>
|
||||
<h3 className="thanks mb-3 mt-6 text-lg">
|
||||
Vielen Dank für die Buchungsanfrage
|
||||
</h3>
|
||||
<p className="mb-6">
|
||||
Nach Prüfung bestätigen wir die Buchung zeitnah per E-Mail.
|
||||
</p>
|
||||
<p>
|
||||
Den{' '}
|
||||
<Link href={`/bookings/${booking.uuid}`}>
|
||||
<a className="link underline">Link</a>
|
||||
</Link>{' '}
|
||||
zur Buchung schicken wir Dir auch per E-Mail. Dort kann die Buchung auch
|
||||
jederzeit storniert werden.
|
||||
</p>
|
||||
{!storedBookingData && !bookingDataStored && (
|
||||
<div className="mt-6">
|
||||
<p>
|
||||
Sollen deine Buchungsdaten für die nächste Buchung in{' '}
|
||||
<strong>deinem Browser</strong> gespeichert werden?
|
||||
</p>
|
||||
<button onClick={store} className="mt-3 ml-0 btn btn-blue">
|
||||
Ja, bitte speichern
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
{bookingDataStored === true && (
|
||||
<div className="mt-6">
|
||||
<p className="info-message">
|
||||
Ok, deine Buchungsdaten wurden für die nächste Buchung gespeichert.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import Layout from '../components/layout'
|
||||
export default function TermsPage({ source }) {
|
||||
return (
|
||||
<Layout>
|
||||
<MDXRemote {...source} components={{...mdComponents}} />
|
||||
<MDXRemote {...source} components={{ ...mdComponents }} />
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import Layout from '../components/layout'
|
||||
export default function Home() {
|
||||
const hello = 'fooo'
|
||||
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<div className="mt-6 sm:text-center">
|
||||
|
||||
@@ -9,7 +9,7 @@ export default function TermsPage({ source }) {
|
||||
return (
|
||||
<Layout>
|
||||
<div className="text-gray-700">
|
||||
<MDXRemote {...source} components={{...mdComponents}}/>
|
||||
<MDXRemote {...source} components={{ ...mdComponents }} />
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
|
||||
@@ -10,8 +10,8 @@ import Layout from '../components/layout'
|
||||
export default function TermsPage({ source }) {
|
||||
return (
|
||||
<Layout>
|
||||
<div className="text-gray-700" >
|
||||
<MDXRemote {...source} components={{...mdComponents}} />
|
||||
<div className="text-gray-700">
|
||||
<MDXRemote {...source} components={{ ...mdComponents }} />
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user