File tree Expand file tree Collapse file tree 3 files changed +37
-20
lines changed Expand file tree Collapse file tree 3 files changed +37
-20
lines changed Original file line number Diff line number Diff line change 1
1
"use client" ;
2
2
3
- import Image from "next/image" ;
4
3
import { useState } from "react" ;
5
4
6
5
import type { Schema } from "@/amplify/data/resource" ;
7
- import LoadingRing from "@/components/LoadingRing " ;
6
+ import KevinLoadingRing from "@/components/KevinLoadingRing " ;
8
7
import { useUser } from "@/components/contexts/UserContext" ;
9
8
import ModalPopup from "@/components/judging/ModalPopup" ;
10
9
import ScoresTable from "@/components/judging/ScoresTable" ;
@@ -53,23 +52,10 @@ export default function JudgingTable({
53
52
} ) ;
54
53
const isFetching = roomIsFetching && teamsForRoomIsFetching ;
55
54
if ( isFetching || ! roomData || ! teamsForRoomData ) {
56
- return (
57
- < div className = "m-4 flex h-full flex-col justify-center" >
58
- < div className = "-ml-4 flex justify-center" >
59
- < LoadingRing />
60
- </ div >
61
-
62
- < Image
63
- src = "/svgs/admin/Kevin.svg"
64
- alt = "Kevin Icon"
65
- width = { 240 }
66
- height = { 240 }
67
- />
68
- </ div >
69
- ) ;
55
+ return < KevinLoadingRing /> ;
70
56
}
71
57
async function getFilteredTeamsCount ( ) {
72
- // https://medium.com/@debbs 119/array-filter-and-array-map-with-async-functions-9636e1ae8d6e --> why it need to map to a boolean array first
58
+ // https://medium.com/@debbs 119/array-filter-and-array-map-with-async-functions-9636e1ae8d6e --> why it needs to map to a boolean array first
73
59
if ( ! teamsForRoomData ) {
74
60
return ;
75
61
}
Original file line number Diff line number Diff line change 2
2
3
3
import { twMerge } from "tailwind-merge" ;
4
4
5
- import LoadingRing from "@/components/LoadingRing" ;
6
-
7
5
import { UserType , useUser } from "../contexts/UserContext" ;
8
6
import Card from "./Card" ;
9
7
@@ -37,7 +35,12 @@ export default function Greetings({
37
35
38
36
< h1 className = "text-3xl md:text-4xl lg:text-6xl" >
39
37
Hello,
40
- { user . isFetching && < LoadingRing /> }
38
+ { user . isFetching && (
39
+ < span className = { `capitalize italic ${ nameColor } ` } >
40
+ { " " }
41
+ Loading...
42
+ </ span >
43
+ ) }
41
44
< span className = { `capitalize italic ${ nameColor } ` } >
42
45
{ " " }
43
46
{ firstName } { lastName } !
Original file line number Diff line number Diff line change
1
+ import Image from "next/image" ;
2
+
3
+ import LoadingRing from "@/components/LoadingRing" ;
4
+
5
+ export default function KevinLoadingRing ( ) {
6
+ return (
7
+ < >
8
+ < div className = "m-4 flex h-full flex-col justify-center text-center text-2xl" >
9
+ < div className = "-ml-4 mb-16 flex justify-center" >
10
+ < LoadingRing />
11
+ </ div >
12
+ < Image
13
+ className = "animate-bounce"
14
+ src = "/svgs/admin/Kevin.svg"
15
+ alt = "Kevin Icon"
16
+ width = { 240 }
17
+ height = { 240 }
18
+ />
19
+ < div className = "ml-2 flex w-full items-center justify-center space-x-1" >
20
+ < span className = "text-dark-pink" > Loading</ span >
21
+ < span className = " mt-3 size-2 animate-pulse rounded-full bg-dark-pink delay-200" > </ span >
22
+ < span className = "delay-400 mt-3 size-2 animate-pulse rounded-full bg-dark-pink" > </ span >
23
+ < span className = "delay-600 mt-3 size-2 animate-pulse rounded-full bg-dark-pink" > </ span >
24
+ </ div >
25
+ </ div >
26
+ </ >
27
+ ) ;
28
+ }
You can’t perform that action at this time.
0 commit comments