// Typescript import { Bookmark, Category } from '../../../interfaces'; import { ContentType } from '../Bookmarks'; // Utils import { CategoryForm } from './CategoryForm'; import { BookmarksForm } from './BookmarksForm'; import { Fragment } from 'react'; interface Props { modalHandler: () => void; contentType: ContentType; inUpdate?: boolean; category?: Category; bookmark?: Bookmark; } export const Form = (props: Props): JSX.Element => { const { modalHandler, contentType, inUpdate, category, bookmark } = props; return ( {!inUpdate ? ( // form: add new {contentType === ContentType.category ? ( ) : ( )} ) : ( // form: update {contentType === ContentType.category ? ( ) : ( )} )} ); };