Small change to loading state

This commit is contained in:
Atridad Lahiji 2023-10-15 18:45:08 -03:00 committed by GitHub
parent 8659770efc
commit b265a5c6e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,6 @@ const VoteUI = () => {
const { const {
data: roomFromDb, data: roomFromDb,
isLoading: roomFromDbLoading, isLoading: roomFromDbLoading,
isFetching: roomFromDbFetching,
} = useQuery({ } = useQuery({
queryKey: ["room"], queryKey: ["room"],
queryFn: getRoomHandler, queryFn: getRoomHandler,
@ -317,7 +316,7 @@ const VoteUI = () => {
// UI // UI
// ================================= // =================================
// Room is loading // Room is loading
if (roomFromDbLoading || roomFromDbFetching) { if (roomFromDbLoading) {
return <LoadingIndicator />; return <LoadingIndicator />;
// Room has been loaded // Room has been loaded
} else { } else {