forked from neptune-mutual-blue/nft-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
[page].jsx
53 lines (48 loc) · 1.38 KB
/
[page].jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import Seo from '@/components/Seo/Seo'
import { BaseLayout } from '@/layouts/BaseLayout'
import { resourcesVideoData } from '@/service/video-api'
import { getSSRData } from '@/utils/ssr'
import { Marketplace } from '@/views/Marketplace'
export async function getServerSideProps (context) {
try {
const { data, marketplaceFilters, pageData } = await getSSRData(context)
const videoData = await resourcesVideoData()
if (data.length === 0) {
return {
notFound: true
}
}
return {
props: {
data,
marketplaceFilters,
pageData,
videos: videoData
}
}
} catch (error) {
return {
notFound: true
}
}
}
export default function MarketplacePage (props) {
return (
<>
<Seo
ogURL={'/marketplace/page/' + props.data[0].pageNumber + '/'}
title='NFT Marketplace / Neptune Mutual'
ogImage='/assets/images/meta/marketplace.png'
ogImageAlt='Neptune Mutual NFT Marketplace'
description='Mint your set of NFTs on our NFT marketplace. Unlock new levels, and grab a wide selection of digital assets. Participate, and join our vibrant NFT community.'
/>
<BaseLayout videos={props.videos}>
<Marketplace
data={props.data}
filters={props.marketplaceFilters}
pageData={props.pageData}
/>
</BaseLayout>
</>
)
}