Skip to content

Commit

Permalink
fixing typescript error
Browse files Browse the repository at this point in the history
  • Loading branch information
moovendhan-v committed Apr 12, 2024
1 parent e0c78d1 commit 5f7b0ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui_tailwind_shadecn/src/screens/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Logo } from "@/components/custom_ui/Svg"
import OutputsOfComponents from "@/components/custom_ui/OutputComponents"
import { ComponentType } from "@/enums/iframEnums"
import { useCategoriesStore, useComponentsStore } from "@/store/store"
import {ComponentsStore, } from '@/types/ComponentStore.type'
import { useEffect } from "react"
import { fetchCategories } from "@/api/components/categories"
import { fetchComponentsStore } from "@/api/components/components"
Expand All @@ -47,7 +48,7 @@ export function Components() {

// this categries getting from a zustand store
const categries = useCategoriesStore((state) => state.categories);
const components = useComponentsStore((state) => state[catogries]);
const components = useComponentsStore((state) => state[catogries as keyof ComponentsStore] ?? 'default');
console.log(components);

useEffect(() => {
Expand Down

0 comments on commit 5f7b0ed

Please sign in to comment.