♻️ Fikser ingress-"feil"
Co-authored-by: Markus A. R. Johansen <markus.aleksander.rakil.johansen@nav.no> Co-authored-by: Amalie Erdal Mansåker <amalie.erdal.mansaker@nav.no>
This commit is contained in:
parent
a4b83e13a6
commit
0271b96cbf
5 changed files with 4 additions and 16 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -72,6 +72,3 @@ yarn-error.log*
|
|||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
### Next ###
|
||||
|
||||
#constants for backend and frontend
|
||||
./frontend/src/const.ts
|
|
@ -1,5 +1,4 @@
|
|||
import FeilCard from "./FeilCard";
|
||||
import { backendURL } from "../const.ts";
|
||||
import { Feilmelding } from "../interface.ts";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
|
@ -17,7 +16,7 @@ const CardsContainer = () => {
|
|||
* @returns response
|
||||
*/
|
||||
async function fetchAlleFeil() {
|
||||
const response = await fetch(backendURL + "/api/hentallefeil", {
|
||||
const response = await fetch("/api/hentallefeil", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
/**
|
||||
* Konstanter vi bruker i diverse filer i applikasjonen
|
||||
*/
|
||||
|
||||
//export const backendURL = "http://localhost:8080"
|
||||
export const backendURL = "https://helse-sprik.intern.dev.nav.no"
|
|
@ -6,7 +6,6 @@ import { PlusIcon } from "@navikt/aksel-icons";
|
|||
import Filtermeny from "./components/Filtermeny";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import axios from "axios";
|
||||
import { backendURL } from "./const";
|
||||
|
||||
export default function Home() {
|
||||
const navigate = useNavigate()
|
||||
|
@ -14,7 +13,7 @@ export default function Home() {
|
|||
const handleChange = (soeketekst: string) => {
|
||||
console.log("search changed")
|
||||
|
||||
axios.post(backendURL + "/api/hentsok", soeketekst, {
|
||||
axios.post("/api/hentsok", soeketekst, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ import { useState } from "react";
|
|||
import BildeOpplastning from "../components/BildeOpplastning";
|
||||
import Header from "../components/Header";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { backendURL } from "../const";
|
||||
|
||||
export default function Feil() {
|
||||
const [tittel, setTittel] = useState("");
|
||||
|
@ -22,7 +21,7 @@ export default function Feil() {
|
|||
dato: new Date().toISOString().replace('Z', '')
|
||||
}
|
||||
|
||||
axios.post(backendURL + "/api/nyfeil", payload, {
|
||||
axios.post("/api/nyfeil", payload, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
|
Reference in a new issue