@tycoonsystems/tycoon-modules
Version:
www.tv.tycoon.systems/documentation
26 lines (21 loc) • 866 B
JavaScript
/* eslint-disable react-hooks/rules-of-hooks */
// If you want to use this as a template for another page, copy entire file and rename "pageName". Use pageDefault variable in app.config.js appropriately.
import React from 'react'
import { PageContainer } from 'tycoon-modules/internal'
import { pageDefaults } from '/app.config'
import { getServerSidePropsDefault } from 'tycoon-modules/utility.js'
const pageName = 'admin'
export const page = props => {
return (
<React.Fragment>
<div className={`${pageName}_Body`}>
<PageContainer { ...props } pageName={pageName}>
</PageContainer>
</div>
</React.Fragment>
)
}
export const getServerSideProps = async (context) => {
return await getServerSidePropsDefault(context, pageDefaults[pageName])
}
export default page