diff options
Diffstat (limited to 'src/App.tsx')
| -rw-r--r-- | src/App.tsx | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/App.tsx b/src/App.tsx index 3623384..c50d1fc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,29 @@ -import { useState } from "react"; -import { ChooseArt } from "./pages/ChooseArt"; -import { Paint } from "./pages/Paint"; +import { useEffect, useState } from 'react'; + +import { ChooseArt } from '@/pages/ChooseArt'; +import { Paint } from '@/pages/Paint'; + +import { gridFromAscii } from '@/utils/grid'; + +const butterfly = `| | +| ⠀⠀⠀⠀⊹ | +| ⢶⢻⣑⣒⢤⡀⠀⢄⠀⠀⡠⠀⢀⡤⣆⣊⡿⡷ | +| ⠀⠹⠹⣚⣣⠻⣦⡀⠀⠀⢀⣴⠟⣸⢓⢎⠏⠀ | +| ⠀⠀⢡⣱⣖⣢⡾⢿⣾⣷⡿⢷⣖⣒⣎⡎⠀⠀ | +| ⠀⠀⠀⣠⠓⢬⠅⡺⢻⡟⢗⠨⡥⠚⣄⠀⠀⠀ | +| ⠀⠀⠀⣿⡆⠘⠆⢇⢸⡇⠸⠰⠃⢰⣿⠀⠀⠀ | +| ⠀⠀⠀⠐⡻⣮⣬⠞⠈⠁⠳⣤⣴⢿⠂⠀⠀⠀ | +| ⠀⠀⠀⡜⠀⠁⠉⠀⠀⠀⠀⠈⠈⠀⢣⠀⠀⠀ | +| ⊹ | +| |`; export const App: React.FC = () => { - const [chosenArt, setChosenArt] = useState<undefined | string>(undefined); + // const [chosenArt, setChosenArt] = useState<undefined | string>(undefined); + const [chosenArt, setChosenArt] = useState<undefined | string>(butterfly); - if (chosenArt === undefined) { - return <ChooseArt artSubmissionCallback={setChosenArt} /> + if (chosenArt !== undefined) { + return <Paint grid={gridFromAscii(chosenArt)} />; } - return <Paint art={chosenArt} /> -} + return <ChooseArt artSubmissionCallback={setChosenArt} />; +}; |
