-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/Change create/edit survey routes
- Loading branch information
Showing
3 changed files
with
39 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import Head from 'next/head'; | ||
import useTranslation from 'next-translate/useTranslation'; | ||
|
||
import SurveyCreator from 'features/surveys/features/SurveyCreator/SurveyCreator'; | ||
import { SurveyCreatorContext } from 'features/surveys/features/SurveyCreator/managers/createSurveyManager/context'; | ||
import { useCreateSurveyManager } from 'features/surveys/features/SurveyCreator/managers/createSurveyManager/createSurveyManager'; | ||
import FullPageWrapper from 'layout/FullPageWrapper'; | ||
import withAnimation from 'shared/HOC/withAnimation'; | ||
import { usePreviewPanelManager } from 'features/surveys/features/SurveyCreator/managers/previewPanelManager/previewPanelManager'; | ||
import { PreviewPanelContext } from 'features/surveys/features/SurveyCreator/managers/previewPanelManager/context'; | ||
|
||
function SurveyCreatePage() { | ||
const { t } = useTranslation('surveyCreate'); | ||
|
||
const manager = useCreateSurveyManager(); | ||
const previewPanelManager = usePreviewPanelManager(); | ||
|
||
return ( | ||
<FullPageWrapper> | ||
<Head> | ||
<title>{t('title')}</title> | ||
<meta name="description" content={t('content')} /> | ||
</Head> | ||
|
||
<SurveyCreatorContext.Provider value={manager}> | ||
<PreviewPanelContext.Provider value={previewPanelManager}> | ||
<SurveyCreator /> | ||
</PreviewPanelContext.Provider> | ||
</SurveyCreatorContext.Provider> | ||
</FullPageWrapper> | ||
); | ||
} | ||
|
||
export default withAnimation(SurveyCreatePage); |
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