diff --git a/src/App.tsx b/src/App.tsx index 073b5f8..40392f0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import { faFileExport, faFileImport, faMinus, + faNewspaper, faPlus, faRedo, faShuffle, @@ -28,7 +29,7 @@ import { Popup } from './components/Popup'; import { Button } from './components/common/Button'; import { Input } from './components/common/Input'; import { Select } from './components/common/Select'; -import { H2 } from './components/common/Typography'; +import { H2, H3 } from './components/common/Typography'; import { cities } from './data/cities'; import { Assortment, IAssortment } from './lib/Assortment'; import { Card } from './lib/Card'; @@ -72,6 +73,13 @@ function createStripeyBackground(colors: string[]): string { } function App() { + const [showWhatsNew, setShowWhatsNew] = useState(() => { + const dismissed = localStorage.getItem('whats_new.version_dismissed'); + const sha = process.env.REACT_APP_GIT_SHA; + const shouldShow = dismissed !== (sha ?? 'dev'); + return shouldShow; + }); + const [drawCount, setDrawCountRaw] = useState(1); const [topDrawFormVisible, setTopDrawFormVisible] = useState(false); const [bottomDrawFormVisible, setBottomDrawFormVisible] = useState(false); @@ -198,6 +206,13 @@ function App() { Redo + { + setShowWhatsNew(true); + }} + > + Whats New + Draw Chance @@ -547,6 +562,41 @@ function App() { }} /> + + + Whats New + + Undo stack + It's janky, but it sortof works! + + + What's New Section + It's also janky! + + + { + localStorage.setItem( + 'whats_new.version_dismissed', + process.env.REACT_APP_GIT_SHA ?? 'dev' + ); + setShowWhatsNew(false); + }} + > + Mark as Read + + setShowWhatsNew(false)}> + Close + + + + ); } diff --git a/src/components/common/Typography.tsx b/src/components/common/Typography.tsx index 281bf7d..b3ad117 100644 --- a/src/components/common/Typography.tsx +++ b/src/components/common/Typography.tsx @@ -13,3 +13,9 @@ export const H2 = styled.h1` font-size: 1.25rem; padding: 0.5rem 0; `; + +export const H3 = styled.h1` + font-size: 1.1rem; + padding: 0.5rem 0; + font-weight: bold; +`;
It's janky, but it sortof works!
It's also janky!