Procházet zdrojové kódy

feat(home): viewMap keys

lind před 4 roky
rodič
revize
acd98a0263
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      src/pages/home/index.tsx

+ 3 - 1
src/pages/home/index.tsx

@@ -11,8 +11,10 @@ const ViewMap = {
   ops: <Ops />,
 };
 
+type ViewType = keyof typeof ViewMap;
+
 const Home = () => {
-  const [current, setCurrent] = useState<'init' | 'device' | 'ops'>('init');
+  const [current, setCurrent] = useState<ViewType>('init');
 
   return (
     <PageContainer>