Created
September 21, 2021 14:14
-
-
Save harrybanda/6160f5e5e7f077c5229d0af7f66511ec to your computer and use it in GitHub Desktop.
index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ForgeUI, { render, Fragment, Macro, useState } from "@forge/ui"; | |
import { BooksTable } from "./BooksTable"; | |
import { BookDialog } from "./BookDialog"; | |
const App = () => { | |
const [isOpenModal, setOpenModal] = useState(false); | |
const [books, setBooks] = useState([]); | |
return ( | |
<Fragment> | |
<BooksTable books={books} setOpenModal={setOpenModal} /> | |
<BookDialog | |
books={books} | |
setBooks={setBooks} | |
isOpenModal={isOpenModal} | |
setOpenModal={setOpenModal} | |
/> | |
</Fragment> | |
); | |
}; | |
export const run = render(<Macro app={<App />} />); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment