From d958c78ce3a494e08aa7c95528ec8be85ba7cc34 Mon Sep 17 00:00:00 2001 From: xdemocle Date: Sat, 18 Dec 2021 20:36:00 +0100 Subject: [PATCH] [FAIR-96] fix build --- pages/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 9ec6af6..37508e8 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -14,16 +14,14 @@ import useFairOs from 'hooks/useFairOs'; const Home: NextPage = () => { const { openPod, getDirectory } = useFairOs(); - const [pod, setPod] = useState(null); const [files, setFiles] = useState(null); const router = useRouter(); const { slug = '/' } = router.query; const { user, isAuthenticated } = useUser(); const getPod = async () => { - const podName = slug === '/' ? 'Home' : slug; - const response = await openPod(podName); - setPod(response); + const podName: string = slug === '/' ? 'Home' : slug[0]; + await openPod(podName); const { data } = await getDirectory({ podName, directory: 'root' });