diff --git a/src/shared/components/LinkList.tsx b/src/shared/components/LinkList.tsx index ce62937..b99563b 100644 --- a/src/shared/components/LinkList.tsx +++ b/src/shared/components/LinkList.tsx @@ -1,14 +1,19 @@ import Sites from '@Data/sites.json' import { Grid } from "@mui/material"; import LinkCard from "./linkcard"; -import { useContext } from 'react'; +import { useContext, useEffect, useState } from 'react'; import { ConfigurableLinksContext } from '../contexts/ConfiguarableLinksContext'; +import { HomepageLink } from '../classes/HomeplageLink'; export default function LinkList() { - const {configurableLinks, setConfigurableLinks} = useContext(ConfigurableLinksContext) + const [configurableLinks, setConfigurableLinks] = useState>( + JSON.parse(localStorage.getItem("configurableLinks") as string) as Array ?? + new Array + ) + return ( - + {Sites.sites.map(site => ( - + {currentPage === 'home' ? ( ): null} {currentPage === 'edit' ? ( ): null} - + )