This repository has been archived on 2024-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
helse-sprik/frontend/pages/index.tsx

30 lines
847 B
TypeScript
Raw Normal View History

2023-06-29 13:17:04 +00:00
import "@navikt/ds-css";
import { Button, Heading } from "@navikt/ds-react";
import axios , { AxiosError } from "axios";
import { log } from "console";
import { useState } from "react"; //useSWR hilsen Emil ;D
async function getWorld() {
try {
const {data} : {data: any} = await axios.get("http://0.0.0.0:8080/");
console.log(data);
return data
} catch (error) {
console.log(error);
}
}
export default function Home() {
getWorld();
return (
2023-06-29 13:17:04 +00:00
<main className="flex justify-center">
<div className="w-1/2 flex flex-col gap-4 justify-center text-center">
2023-06-29 13:17:04 +00:00
<Heading level="1" size="xlarge">Sprik</Heading>
<Button variant="primary">Meld inn feil</Button>
<Button variant="secondary">Meld inn funksjonalitetsønsker</Button>
{/* <p>{getWorld()}</p> */}
</div>
</main>
)
}