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