Skip to content

Commit d6b4eb3

Browse files
committed
Homeでユーザー取得時にloading画面にする
1 parent da11920 commit d6b4eb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

web/app/home/page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ export default function Home() {
7777
[recommended, controls, backCardControls],
7878
);
7979

80-
if (recommended == null) {
80+
if (data === undefined) {
8181
return <FullScreenCircularProgress />;
8282
}
8383
if (currentUser == null) {
8484
return <FullScreenCircularProgress />;
8585
}
86-
if (displayedUser == null) {
86+
if (recommended.size() === 0) {
8787
return <NoMoreUser />;
8888
}
8989
if (error) throw error;
@@ -173,4 +173,7 @@ class Queue<T> {
173173
pop(): T | undefined {
174174
return this.store.shift();
175175
}
176+
size(): number {
177+
return this.store.length;
178+
}
176179
}

0 commit comments

Comments
 (0)