setComplete(true)} />
+ );
+ }
+
+ if (isLoading) {
+ return ;
+ }
+
+ if (error) {
+ return Error loading bots! {error.message}
;
+ }
return (
@@ -42,11 +66,7 @@ export default function Home() {
{!isEmpty(bots) &&
map(bots, (bot: Bot) => (
-
+
))}
import('lottie-react'), { ssr: false });
-const FullPageSkeleton = () => {
+export const SKELETON_MAP = {
+ LOADING: Walk,
+ OPENING: WalkJump,
+};
+
+export interface FullPageSkeletonProps {
+ type?: 'LOADING' | 'OPENING';
+ onComplete?: () => void;
+}
+
+const FullPageSkeleton = (props: FullPageSkeletonProps) => {
+ const { type = 'LOADING', onComplete } = props;
return (
);
diff --git a/client/components/User.tsx b/client/components/User.tsx
index 5334c28d..24e37783 100644
--- a/client/components/User.tsx
+++ b/client/components/User.tsx
@@ -1,6 +1,6 @@
'use client';
import { useRouter } from 'next/navigation';
-import { Avatar, Button, Link } from '@nextui-org/react';
+import { Avatar, Button } from '@nextui-org/react';
import useUser from '../app/hooks/useUser';
import { LoginIcon } from '@/public/icons/LoginIcon';
@@ -8,7 +8,7 @@ export default function Profile() {
const router = useRouter();
const { data: user, status } = useUser();
const apiDomain = process.env.NEXT_PUBLIC_API_DOMAIN;
- if (!user || status !== "success") {
+ if (!user || status !== 'success') {
return (