Skip to content

Commit 04a860a

Browse files
committed
Format frontend
1 parent a91a65e commit 04a860a

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

frontend/components/matching/find-match.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useToast } from "@/components/hooks/use-toast";
77
import { useAuth } from "@/app/auth/auth-context";
88
import { joinMatchQueue } from "@/lib/join-match-queue";
99
import { leaveMatchQueue } from "@/lib/leave-match-queue";
10-
import { matchingServiceWebSockUri } from "@/lib/api-uri";
1110
import { subscribeMatch } from "@/lib/subscribe-match";
1211

1312
export default function FindMatch() {
@@ -105,7 +104,7 @@ export default function FindMatch() {
105104
description: "Matching has been stopped",
106105
variant: "destructive",
107106
});
108-
}
107+
};
109108
setWebsocket(ws);
110109
return;
111110
default:
@@ -146,7 +145,12 @@ export default function FindMatch() {
146145
return;
147146
}
148147

149-
const response = await leaveMatchQueue(auth.token, auth.user?.id, selectedTopic, selectedDifficulty);
148+
const response = await leaveMatchQueue(
149+
auth.token,
150+
auth.user?.id,
151+
selectedTopic,
152+
selectedDifficulty
153+
);
150154
switch (response.status) {
151155
case 200:
152156
setIsSearching(false);

frontend/lib/api-uri.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ export const questionServiceUri: (baseUri: string) => string = (baseUri) =>
1111
export const matchingServiceUri: (baseUri: string) => string = (baseUri) =>
1212
constructUri(baseUri, process.env.NEXT_PUBLIC_MATCHING_SVC_PORT);
1313

14-
export const matchingServiceWebSockUri: (baseUri: string) => string = (baseUri) =>
15-
constructWebSockUri(baseUri, process.env.NEXT_PUBLIC_MATCHING_SVC_PORT);
14+
export const matchingServiceWebSockUri: (baseUri: string) => string = (
15+
baseUri
16+
) => constructWebSockUri(baseUri, process.env.NEXT_PUBLIC_MATCHING_SVC_PORT);

frontend/lib/subscribe-match.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const subscribeMatch = async (
88
const params = new URLSearchParams({
99
topic: category,
1010
difficulty: complexity,
11-
})
11+
});
1212
return new WebSocket(
1313
`${matchingServiceWebSockUri(window.location.hostname)}/match/subscribe/${userId}?${params}`
1414
);

0 commit comments

Comments
 (0)