mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-08-02 19:46:40 +08:00

* [resumes][chore] Update TODOs * [resumes][refactor] Change to new schema * [resumes][refactor] Change query to findUniqueOrThrow Co-authored-by: Terence Ho <>
25 lines
567 B
TypeScript
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}
|
|
/>
|
|
);
|
|
}
|