blob: c50d1fcd73daaa226ed8263014a5127baf104ce0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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>(butterfly);
if (chosenArt !== undefined) {
return <Paint grid={gridFromAscii(chosenArt)} />;
}
return <ChooseArt artSubmissionCallback={setChosenArt} />;
};
|