-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move getServerSideProps to src/screens
- Loading branch information
1 parent
99a6c41
commit fc289f8
Showing
5 changed files
with
12 additions
and
21 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
packages/app-project/pages/projects/[owner]/[project]/classify/index.js
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,3 +1,2 @@ | ||
export { default } from '@screens/ClassifyPage' | ||
export { default as getServerSideProps } from '@helpers/getDefaultPageProps' | ||
export { default, getServerSideProps } from '@screens/ClassifyPage' | ||
|
10 changes: 1 addition & 9 deletions
10
...ages/app-project/pages/projects/[owner]/[project]/classify/workflow/[workflowID]/index.js
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,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 }) | ||
} |
11 changes: 1 addition & 10 deletions
11
...ects/[owner]/[project]/classify/workflow/[workflowID]/subject-set/[subjectSetID]/index.js
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,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' |
8 changes: 8 additions & 0 deletions
8
packages/app-project/src/screens/ClassifyPage/getServerSideProps.js
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,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 }) | ||
} |
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 +1,2 @@ | ||
export { default } from './ClassifyPageContainer' | ||
export { getServerSideProps } from './getServerSideProps' |