diff --git a/src/client/components/Recommendations/Recommendations.tsx b/src/client/components/Recommendations/Recommendations.tsx index 8233fab9..9caabbf0 100644 --- a/src/client/components/Recommendations/Recommendations.tsx +++ b/src/client/components/Recommendations/Recommendations.tsx @@ -29,8 +29,6 @@ const Recommendations: React.FC<{ const dimensions = watch('1') - if (!dimensions) return null - return ( diff --git a/src/client/hooks/useSurvey.tsx b/src/client/hooks/useSurvey.tsx index e8a80360..ecfe8d46 100644 --- a/src/client/hooks/useSurvey.tsx +++ b/src/client/hooks/useSurvey.tsx @@ -6,9 +6,12 @@ function useSurvey(): Survey { const [survey, setSurvey] = useState(null) useEffect(() => { - axios - .get('/api/surveys/0') - .then((facultyData) => setSurvey(facultyData.data)) + const fetchSurveyData = async () => { + await axios + .get('/api/surveys/0') + .then((facultyData) => setSurvey(facultyData.data)) + } + fetchSurveyData() }, []) return survey diff --git a/src/server/db/seeders/data/devQuestionData.ts b/src/server/db/seeders/data/devQuestionData.ts index de635826..7a365104 100644 --- a/src/server/db/seeders/data/devQuestionData.ts +++ b/src/server/db/seeders/data/devQuestionData.ts @@ -130,6 +130,7 @@ const getQuestionData = () => [ visibility: {}, }, { + id: 3, surveyId: 0, priority: 2, title: { @@ -174,7 +175,7 @@ const getQuestionData = () => [ visibility: {}, }, { - id: 3, + id: 4, surveyId: 0, priority: 3, title: { @@ -243,7 +244,7 @@ const getQuestionData = () => [ visibility: {}, }, { - id: 4, + id: 5, surveyId: 0, parentId: 3, priority: 0, @@ -281,7 +282,7 @@ const getQuestionData = () => [ visibility: {}, }, { - id: 5, + id: 6, surveyId: 0, priority: 4, title: { @@ -326,7 +327,7 @@ const getQuestionData = () => [ visibility: {}, }, { - id: 6, + id: 7, surveyId: 0, parentId: 2, priority: 0,