December 2019
Intermediate to advanced
598 pages
12h 21m
English
Let's focus on the QuestionPage component now and only allow an answer to be submitted if the user is authenticated:
import { useAuth } from './Auth';
export const QuestionPage: ... = ( ... ) => { ... const { isAuthenticated } = useAuth(); return ( ... );};
<AnswerList data={question.answers} />{isAuthenticated && ( <div ... > <Form submitCaption="Submit Your Answer" ...Read now
Unlock full access