import "@navikt/ds-css"; import { Button, Heading } from "@navikt/ds-react"; import axios , { Axios, AxiosError } from "axios"; import { log } from "console"; import useSWR from "swr"; const fetcher = (url: any) => axios.get(url).then(res => res.data) export default function Home() { const {data, error, isLoading} = useSWR('http://0.0.0.0:8080/', fetcher); console.log(data); return (
Sprik {data ?
{data}
:
Laster
}
) }