mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
Change: move custom.css linking to head to avoid FOUC (#2916)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
4dca4cc892
commit
a251c34059
2 changed files with 2 additions and 20 deletions
|
@ -1,10 +0,0 @@
|
|||
import useSWR from "swr";
|
||||
|
||||
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);
|
||||
|
||||
if (error) return errorValue;
|
||||
if (isLoading) return loadingValue;
|
||||
return data || emptyValue;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue