summaryrefslogtreecommitdiff
path: root/src/App.tsx
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-10-04 18:36:10 -0700
committerElizabeth Hunt <me@liz.coffee>2025-10-04 18:36:10 -0700
commit35add63ec4dce39710095f17abd86777de9e5b49 (patch)
tree1afdf952f310e09a663e85541474efdc95155a73 /src/App.tsx
parent507c972ecafeceaf4f8962ad881f8fb50c9b86c1 (diff)
downloadansicolor-35add63ec4dce39710095f17abd86777de9e5b49.tar.gz
ansicolor-35add63ec4dce39710095f17abd86777de9e5b49.zip
Working history state
Diffstat (limited to 'src/App.tsx')
-rw-r--r--src/App.tsx32
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} />;
+};