🏗️ Lagt til axios

Co-authored-by: Sindre Kjelsrud <sindre.kjelsrud@nav.no>
Co-authored-by: Markus A. R. Johansen <markus.aleksander.rakil.johansen@nav.no>
This commit is contained in:
amalieem 2023-07-03 15:50:37 +02:00
parent 1cb8e1713d
commit 7b58056c43
3 changed files with 74 additions and 0 deletions

View file

@ -2,7 +2,23 @@ import "@navikt/ds-css";
import { Button, Heading } from "@navikt/ds-react";
const axios=require('axios').default
async function getWorld() {
axios.get("/")
.then((response : any) => {
console.log(response);
}).catch((error : any) => {
console.log(error);
})
}
export default function Home() {
getWorld();
return (
<main className="flex justify-center">
<div className="w-1/2 flex flex-col gap-4 justify-center text-center">