Skip to content

Commit

Permalink
Move getServerSideProps to src/screens
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Jan 5, 2021
1 parent 99a6c41 commit fc289f8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default } from '@screens/ClassifyPage'
export { default as getServerSideProps } from '@helpers/getDefaultPageProps'
export { default, getServerSideProps } from '@screens/ClassifyPage'

Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
import getDefaultPageProps from '@helpers/getDefaultPageProps'
export { default, getServerSideProps } from '@screens/ClassifyPage'

export { default } from '@screens/ClassifyPage'

export async function getServerSideProps({ params, query, req, res }) {
const { workflowID } = params
const { props: defaultProps } = await getDefaultPageProps({ params, query, req, res })
const props = Object.assign({}, { workflowID }, defaultProps)
return ({ props })
}
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
import getDefaultPageProps from '@helpers/getDefaultPageProps'

export { default } from '@screens/ClassifyPage'

export async function getServerSideProps({ params, query, req, res }) {
const { subjectSetID, workflowID } = params
const { props: defaultProps } = await defaultServerSideProps({ params, query, req, res })
const props = Object.assign({}, { subjectSetID, workflowID }, defaultProps)
return ({ props })
}
export { default, getServerSideProps } from '@screens/ClassifyPage'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import getDefaultPageProps from '@helpers/getDefaultPageProps'

export async function getServerSideProps({ params, query, req, res }) {
const { subjectSetID, workflowID } = params
const { props: defaultProps } = await getDefaultPageProps({ params, query, req, res })
const props = Object.assign({}, { subjectSetID, workflowID }, defaultProps)
return ({ props })
}
1 change: 1 addition & 0 deletions packages/app-project/src/screens/ClassifyPage/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default } from './ClassifyPageContainer'
export { getServerSideProps } from './getServerSideProps'

0 comments on commit fc289f8

Please sign in to comment.