mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-06 20:28:48 +00:00
improve error state for resources component
This commit is contained in:
parent
481cb71e65
commit
ca7ccee3d0
1 changed files with 10 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import useSWR from "swr";
|
||||
import { FiHardDrive, FiCpu } from "react-icons/fi";
|
||||
import { FaMemory } from "react-icons/fa";
|
||||
import { BiError } from "react-icons/bi";
|
||||
|
||||
export default function Resources({ options }) {
|
||||
const { data, error } = useSWR(
|
||||
|
@ -11,7 +12,15 @@ export default function Resources({ options }) {
|
|||
);
|
||||
|
||||
if (error) {
|
||||
return <div>failed to load</div>;
|
||||
return (
|
||||
<div className="flex-none flex flex-row items-center justify-center mr-5">
|
||||
<BiError className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
||||
<div className="flex flex-col ml-3 text-left font-mono">
|
||||
<span className="text-theme-800 dark:text-theme-200 text-xs">Resources</span>
|
||||
<span className="text-theme-800 dark:text-theme-200 text-xs">Error</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue