Skip to content

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
reacto11mecha committed Jul 8, 2024
1 parent 20f25a9 commit 4d19381
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions apps/clients/chooser/src/context/participant-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useState,
useEffect
} from "react";
import { UniversalError } from "@/components/universal-error";
import { api } from "@/utils/api";
import { motion } from "framer-motion";
import { Navigate } from "react-router-dom";

import { useKeyboardWebsocket } from "./keyboard-websocket";

export interface IParticipantContext {
Expand Down Expand Up @@ -56,17 +57,26 @@ export const ParticipantProvider = ({

switch (actualCommand) {
case "RELOAD": {
if (!!qrId &&
participantQuery.isFetched && (
!participantQuery.data?.alreadyAttended || participantQuery.data?.alreadyChoosing
)) location.reload();
if (
!!qrId &&
participantQuery.isFetched &&
(!participantQuery.data?.alreadyAttended ||
participantQuery.data?.alreadyChoosing)
)
location.reload();

break;
}
}
}
}
}, [qrId, participantQuery.isFetched, participantQuery.data, wsEnabled, lastMessage]);
}, [
qrId,
participantQuery.isFetched,
participantQuery.data,
wsEnabled,
lastMessage,
]);

const propsValue = useMemo(() => {
if (!qrId)
Expand Down
2 changes: 1 addition & 1 deletion apps/clients/chooser/src/context/server-setting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { api } from "@/utils/api";
import { motion } from "framer-motion";
import { Loader } from "lucide-react";

import { useParticipant } from "./participant-context";
import { useKeyboardWebsocket } from "./keyboard-websocket";
import { useParticipant } from "./participant-context";

interface ISettingContext {
canVote: boolean;
Expand Down

0 comments on commit 4d19381

Please sign in to comment.