diff --git a/frontend/src/contexts/config.context.tsx b/frontend/src/contexts/config.context.tsx index d84f28e..c18f019 100644 --- a/frontend/src/contexts/config.context.tsx +++ b/frontend/src/contexts/config.context.tsx @@ -6,7 +6,7 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ -import { useState, useEffect, createContext } from "react"; +import { createContext, useEffect, useState } from "react"; export const ConfigContext = createContext(null); @@ -16,13 +16,13 @@ export interface IConfig { } export const ConfigProvider = ({ children }) => { - const [config, setConfig] = useState(null); + const [config, setConfig] = useState(null); useEffect(() => { const fetchConfig = async () => { try { const res = await fetch("/config"); - const data = await res.json(); + const data = (await res.json()) as IConfig; setConfig(data); } catch (error) {