From 9541607473fba9a2c7129713654191d3a9e59b46 Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Sat, 28 Jan 2023 18:02:01 +0900 Subject: [PATCH] Small change to simplify the demo call to the backend --- website/src/pages/dashboard.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/src/pages/dashboard.tsx b/website/src/pages/dashboard.tsx index 8b9e3cae..3f97301f 100644 --- a/website/src/pages/dashboard.tsx +++ b/website/src/pages/dashboard.tsx @@ -7,12 +7,11 @@ import { TaskCategory } from "src/components/Tasks/TaskTypes"; import { get } from "src/lib/api"; import type { AvailableTasks, TaskType } from "src/types/Task"; export { getDefaultStaticProps as getStaticProps } from "src/lib/default_static_props"; -import useSWR from "swr"; import useSWRImmutable from "swr/immutable"; const Dashboard = () => { // Adding a demonstrative call to the backend that includes the web's JWT. - useSWR(`${process.env.BACKEND_URL}/api/v1/auth/check`, get); + useSWRImmutable(`${process.env.FASTAPI_URL}/api/v1/auth/check`, get); const { data } = useSWRImmutable("/api/available_tasks", get);