-
-
Save Daltonic/e9f1338669629696eb0502dc75331c25 to your computer and use it in GitHub Desktop.
Dapp Bnb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from 'next/head' | |
import { getApartments } from '@/services/blockchain' | |
import { Category, Collection } from '@/components' | |
export default function Home({ apartmentsData }) { | |
return ( | |
<div> | |
<Head> | |
<title>Home Page</title> | |
<link rel="icon" href="/favicon.ico" /> | |
</Head> | |
<Category /> | |
<Collection appartments={apartmentsData} /> | |
</div> | |
) | |
} | |
export const getServerSideProps = async () => { | |
const apartmentsData = await getApartments() | |
return { | |
props: { | |
apartmentsData: JSON.parse(JSON.stringify(apartmentsData)), | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment