Skip to content

Instantly share code, notes, and snippets.

@Daltonic
Created December 21, 2023 09:16
Show Gist options
  • Save Daltonic/e9f1338669629696eb0502dc75331c25 to your computer and use it in GitHub Desktop.
Save Daltonic/e9f1338669629696eb0502dc75331c25 to your computer and use it in GitHub Desktop.
Dapp Bnb
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