From 774bce5420729b8f308f029c0fac8e2da402ee7a Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Fri, 4 Feb 2022 19:21:26 +0100 Subject: [PATCH] Silence SWR api logging --- components/REPL/REPLInput.tsx | 2 +- pages/api/projects.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/REPL/REPLInput.tsx b/components/REPL/REPLInput.tsx index 4e7c74c..540a9a2 100644 --- a/components/REPL/REPLInput.tsx +++ b/components/REPL/REPLInput.tsx @@ -29,7 +29,7 @@ const REPLInput: NextPage = ({historyCallback, historyClear, in const [cmdHistory, setCmdHistory] = useState([]); const [usrInputTmp, setUsrInputTmp] = useState(""); const [cmdIf, setCmdIf] = useState(new CommandInterface(modalManipulation, [])); - const { data: projects, error: projectsError } = useSWR("/api/projects", fetchProjects); + const { data: projects, error: projectsError } = useSWR("/api/projects?swr=1", fetchProjects); const setInput = (inputRef: HTMLInputElement, input: string) => { const nativeSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set; diff --git a/pages/api/projects.ts b/pages/api/projects.ts index a27f351..9562a52 100644 --- a/pages/api/projects.ts +++ b/pages/api/projects.ts @@ -18,7 +18,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse