Skip to content

Commit

Permalink
[FAIR-96] fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
xdemocle committed Dec 18, 2021
1 parent 81bf0a4 commit d958c78
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' });

Expand Down

0 comments on commit d958c78

Please sign in to comment.