import Head from 'next/head'; import Shell from '../components/Shell'; import { useState } from 'react'; import { useSession, getSession } from 'next-auth/client'; export default function Home() { const [ session, loading ] = useSession(); const [ integrations, setIntegrations ] = useState([]); if (loading) { return
Loading...
; } else { if (!session) { window.location.href="/"; } } function getIntegrations() { fetch('/api/integrations') .then((response) => response.json()) .then((data) => setIntegrations(data)); } getIntegrations() return (