-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5babc36
commit 456ceb6
Showing
17 changed files
with
298 additions
and
223 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {GetServerSideProps} from 'next' | ||
import {PubSlugPageProps} from 'publication-slug-page' | ||
import {EveryPageProps} from './_app' | ||
import GroupPublicationPage from './g/[groupEid]/[pathName]' | ||
import {getSiteGroup} from 'server/site-info' | ||
import {getGroupPathNamePageProps, getGroupView} from 'server/group' | ||
|
||
const PathPublicationPage = GroupPublicationPage | ||
export default PathPublicationPage | ||
|
||
export const getServerSideProps: GetServerSideProps< | ||
EveryPageProps & PubSlugPageProps | ||
> = async (context) => { | ||
const pathName = (context.params?.pathName as string) || '' | ||
const {groupEid} = await getSiteGroup() | ||
return await getGroupPathNamePageProps({ | ||
groupEid, | ||
pathName, | ||
context, | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
import {GetServerSideProps} from 'next' | ||
import PublicationSlugPage, {PubSlugPageProps} from 'publication-slug-page' | ||
import {prepareSlugPage} from 'server/page-slug' | ||
import {PubSlugPageProps} from 'publication-slug-page' | ||
import {EveryPageProps} from './_app' | ||
import {getGroupPageProps, getGroupView} from 'server/group' | ||
import {getSiteGroup} from 'server/site-info' | ||
import GroupPage, {GroupPageProps} from './g/[groupEid]' | ||
|
||
// // Temp Mintter home screen document: | ||
// let fallbackDocId = process.env.MINTTER_HOME_PUBID || 'mnoboS11GwRlRAh2dhYlTw' | ||
// let fallbackVersion = | ||
// process.env.MINTTER_HOME_VERSION || | ||
// 'bafy2bzacednwllikmc7rittnmz4s7cfpo3p2ldsap3bcmgxp7cdpzhoiu5w' | ||
|
||
// //https://mintter.com/p/mnoboS11GwRlRAh2dhYlTw?v=bafy2bzacednwllikmc7rittnmz4s7cfpo3p2ldsap3bcmgxp7cdpzhoiu5w | ||
|
||
export default function HomePage(props: {pathName: string}) { | ||
return <PublicationSlugPage pathName={props.pathName} /> | ||
export default function HomePage(props: GroupPageProps) { | ||
return <GroupPage {...props} /> | ||
} | ||
|
||
export const getServerSideProps: GetServerSideProps< | ||
EveryPageProps & PubSlugPageProps | ||
> = async (context) => { | ||
return await prepareSlugPage(context, '/') | ||
const {groupEid} = await getSiteGroup() | ||
console.log('serer side', context.query) | ||
const view = getGroupView(context.query.view) | ||
return await getGroupPageProps({groupEid, context, view}) | ||
} |
Oops, something went wrong.