Files
Terence 1146c5db40 [resumes][refactor] Change to ResumesProfile schema (#318)
* [resumes][chore] Update TODOs

* [resumes][refactor] Change to new schema

* [resumes][refactor] Change query to findUniqueOrThrow

Co-authored-by: Terence Ho <>
2022-10-07 16:09:52 +08:00

25 lines
567 B
TypeScript

import { useState } from 'react';
import CommentsForm from './CommentsForm';
import CommentsList from './CommentsList';
type ICommentsSectionProps = {
resumeId: string;
};
export default function CommentsSection({ resumeId }: ICommentsSectionProps) {
const [showCommentsForm, setShowCommentsForm] = useState(false);
return showCommentsForm ? (
<CommentsForm
resumeId={resumeId}
setShowCommentsForm={setShowCommentsForm}
/>
) : (
<CommentsList
resumeId={resumeId}
setShowCommentsForm={setShowCommentsForm}
/>
);
}