From 7e0e62d4ecf8809246581a6408820a173969cc46 Mon Sep 17 00:00:00 2001 From: Henrique Fontenele Date: Thu, 5 Oct 2023 13:30:49 -0300 Subject: [PATCH] feat: add skeleton to loadings --- src/app/events/[event]/page.tsx | 28 +++++++++++++++++++++++++++- src/app/events/page.tsx | 21 ++++++++++++++++++++- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/app/events/[event]/page.tsx b/src/app/events/[event]/page.tsx index bf97fd4..50addcc 100644 --- a/src/app/events/[event]/page.tsx +++ b/src/app/events/[event]/page.tsx @@ -193,7 +193,33 @@ export default function Event({ params }: EventProps) { } if (eventQuery.isLoading) { - return

Carregando dados do evento...

+ return ( +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ) } return ( diff --git a/src/app/events/page.tsx b/src/app/events/page.tsx index 1799418..df646f2 100644 --- a/src/app/events/page.tsx +++ b/src/app/events/page.tsx @@ -36,6 +36,26 @@ export default function Events() { registerEventMutation.mutate(data) } + if (eventsQuery.isLoading) { + return ( +
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ ) + } + return (
@@ -48,7 +68,6 @@ export default function Events() { />
- {eventsQuery.isLoading &&

Carregando eventos...

} {events.length === 0 && eventsQuery.isSuccess && (

Nenhum evento cadastrado.

)}