mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-24 21:39:36 +02:00
Split categories and bookmarks forms into separate files. Added visibility functionality to categories and bookmarks
This commit is contained in:
parent
f127a354ef
commit
d83e3056c6
16 changed files with 484 additions and 369 deletions
|
@ -18,8 +18,8 @@ import { Container, Headline, ActionButton, Spinner, Modal } from '../UI';
|
|||
|
||||
// Components
|
||||
import { BookmarkGrid } from './BookmarkGrid/BookmarkGrid';
|
||||
import { BookmarkForm } from './BookmarkForm/BookmarkForm';
|
||||
import { BookmarkTable } from './BookmarkTable/BookmarkTable';
|
||||
import { Form } from './Form/Form';
|
||||
|
||||
// Utils
|
||||
import { bookmarkTemplate, categoryTemplate } from '../../utility';
|
||||
|
@ -98,24 +98,13 @@ export const Bookmarks = (props: Props): JSX.Element => {
|
|||
return (
|
||||
<Container>
|
||||
<Modal isOpen={modalIsOpen} setIsOpen={toggleModal}>
|
||||
{!isInUpdate ? (
|
||||
<BookmarkForm
|
||||
modalHandler={toggleModal}
|
||||
contentType={formContentType}
|
||||
/>
|
||||
) : formContentType === ContentType.category ? (
|
||||
<BookmarkForm
|
||||
modalHandler={toggleModal}
|
||||
contentType={formContentType}
|
||||
category={categoryInUpdate}
|
||||
/>
|
||||
) : (
|
||||
<BookmarkForm
|
||||
modalHandler={toggleModal}
|
||||
contentType={formContentType}
|
||||
bookmark={bookmarkInUpdate}
|
||||
/>
|
||||
)}
|
||||
<Form
|
||||
modalHandler={toggleModal}
|
||||
contentType={formContentType}
|
||||
inUpdate={isInUpdate}
|
||||
category={categoryInUpdate}
|
||||
bookmark={bookmarkInUpdate}
|
||||
/>
|
||||
</Modal>
|
||||
|
||||
<Headline title="All Bookmarks" subtitle={<Link to="/">Go back</Link>} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue