From 1aa058ba7f75f72013acfe3142db3489ed140400 Mon Sep 17 00:00:00 2001 From: Entkenntnis Date: Sun, 21 May 2023 11:35:17 +0200 Subject: [PATCH] add appearance modal --- components/App.tsx | 3 + components/modals/AppearanceModal.tsx | 100 ++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 components/modals/AppearanceModal.tsx diff --git a/components/App.tsx b/components/App.tsx index 58299e0f..0fa03f85 100644 --- a/components/App.tsx +++ b/components/App.tsx @@ -19,6 +19,7 @@ import { ShareModal } from './modals/ShareModal' import { Analyze } from './pages/Analyze' import { Demo } from './pages/Demo' import { SuccessModal } from './modals/SuccessModal' +import { AppearanceModal } from './modals/AppearanceModal' export function App() { const core = useCore() @@ -82,6 +83,8 @@ export function App() { return } else if (core.ws.modal == 'success') { return + } else if (core.ws.modal == 'appearance') { + return } else { return null } diff --git a/components/modals/AppearanceModal.tsx b/components/modals/AppearanceModal.tsx new file mode 100644 index 00000000..cf648496 --- /dev/null +++ b/components/modals/AppearanceModal.tsx @@ -0,0 +1,100 @@ +import { useEffect, useState } from 'react' +import { closeModal } from '../../lib/commands/modal' +import { useCore } from '../../lib/state/core' +import { View } from '../helper/View' +import { Heading } from '../../lib/state/types' + +export function AppearanceModal() { + // const [selected, setSelected] = useState(-1) + // const [code, setCode] = useState('') + + const [count, setCount] = useState(0) + + useEffect(() => { + const interval = setInterval(() => { + setCount((prevCount) => prevCount + 1) + }, 750) + + return () => { + clearInterval(interval) + } + }, []) + + const core = useCore() + return ( +
{ + closeModal(core) + }} + > +
{ + e.stopPropagation() + }} + > +

+ Passe das Aussehen von Karol an +

+
+
+
+ +
+
+

+ Kappe:{' '} + +

+

+ Shirt:{' '} + +

+

+ Hose:{' '} + +

+

+ Hautton:{' '} + +

+
+
+

+ +

+
+
+ ) +}