mirror of
https://github.com/skidoodle/hostinfo
synced 2025-03-16 13:59:38 +01:00
first commit
This commit is contained in:
commit
38e6f714cb
26 changed files with 1856 additions and 0 deletions
29
entrypoints/popup/Popup.tsx
Normal file
29
entrypoints/popup/Popup.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { Spinner } from '@/components/Spinner';
|
||||
import ServerInfo from '@/components/ServerInfo';
|
||||
import Error from '@/components/Error';
|
||||
|
||||
export default function Popup() {
|
||||
const { data, loading, error } = useTabData();
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-48 bg-gray-900">
|
||||
<Spinner className="w-12 h-12 text-purple-500" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<Error error={error} />
|
||||
);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return (
|
||||
<Error error="No data found" />
|
||||
);
|
||||
}
|
||||
|
||||
return <ServerInfo data={data} />;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue