-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load survey answers data from backend #15
Conversation
}, [surveyId]); | ||
|
||
const getSurveyData = async () => { | ||
const surveyData = await getDoc(doc(db, 'surveys', surveyId!)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surveyId!
typescript płacze o to.
można po prostu zrobić tak jak tu: https://github.com/Ryczko/Employee-pulse/blob/95cd3d4bc8914ec78cd9019e6371d5b280e60e1c/src/Pages/SurveyPage/index.tsx#L32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nie płacze, tak to unikamy redundancji kodu kilka linijek wyżej, świadomie to jest użyte i nie ma opcji żeby to było null lub undefined. Ja bym zostawił
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
najwyżej po prostu wyłącz ten rule w configu eslinta jak chcesz
return; | ||
} | ||
const surveyData = await getDoc(doc(db, 'surveys', surveyId)); | ||
const surveyData = await getDoc(doc(db, 'surveys', surveyId!)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git było, typescript znowu płacze 😢
Load survey answers data from backend
No description provided.