diff --git a/src/components/filecontent.jsx b/src/components/filecontent.jsx index 6db30d18..e99cbb87 100644 --- a/src/components/filecontent.jsx +++ b/src/components/filecontent.jsx @@ -1,10 +1,8 @@ import useSWR from "swr" -export default function FileContent({ path, loadingValue, errorValue, emptyValue = '', refresh = 1500 }) { +export default function FileContent({ path, loadingValue, errorValue, emptyValue = '' }) { const fetcher = (url) => fetch(url).then((res) => res.text()) - const { data, error, isLoading } = useSWR(`/api/config/${ path }`, fetcher, { - refreshInterval: refresh, - }) + const { data, error, isLoading } = useSWR(`/api/config/${ path }`, fetcher) if (error) return (errorValue) if (isLoading) return (loadingValue) diff --git a/src/pages/api/hash.js b/src/pages/api/hash.js index 0e8d0261..b14a0627 100644 --- a/src/pages/api/hash.js +++ b/src/pages/api/hash.js @@ -4,7 +4,7 @@ import { readFileSync } from "fs"; import checkAndCopyConfig, { CONF_DIR } from "utils/config/config"; -const configs = ["docker.yaml", "settings.yaml", "services.yaml", "bookmarks.yaml", "widgets.yaml"]; +const configs = ["docker.yaml", "settings.yaml", "services.yaml", "bookmarks.yaml", "widgets.yaml", "custom.css", "custom.js"]; function hash(buffer) { const hashSum = createHash("sha256");