import BeerForm from '@/components/BeerForm'; import Layout from '@/components/Layout'; import getAllBreweryPosts from '@/services/BreweryPost/getAllBreweryPosts'; import BreweryPostQueryResult from '@/services/BreweryPost/types/BreweryPostQueryResult'; import { NextPage } from 'next'; interface CreateBeerPageProps { breweries: BreweryPostQueryResult[]; } const Create: NextPage = ({ breweries }) => { return (
); }; export const getServerSideProps = async () => { const breweryPosts = await getAllBreweryPosts(); return { props: { breweries: breweryPosts, }, }; }; export default Create;