🥅 Catching an error more efficiently

This commit is contained in:
Mawoka
2022-09-17 12:04:40 +02:00
parent 9eea9fd950
commit fa0db5c259
2 changed files with 7 additions and 5 deletions
+5 -4
View File
@@ -28,9 +28,10 @@ export const start_game = async (id: string) => {
alertModal.subscribe((_) => {
window.location.assign('/account/login?returnTo=/dashboard');
});
} else {
const data = await res.json();
// eslint-disable-next-line no-undef
plausible('Started Game', { props: { quiz_id: id } });
window.location.assign(`/admin?token=${data.game_id}&pin=${data.game_pin}&connect=1`);
}
const data = await res.json();
// eslint-disable-next-line no-undef
plausible('Started Game', { props: { quiz_id: id } });
window.location.assign(`/admin?token=${data.game_id}&pin=${data.game_pin}&connect=1`);
};
+2 -1
View File
@@ -159,8 +159,9 @@
</li>
<li class="py-2">
<a
target="_blank"
class="text-lg font-medium lg:px-4 text-gray-600 hover:text-green-600 link-hover"
href="https://github.com/mawoka-myblock/classquiz">GitHub</a
href="https://github.com/mawoka-myblock/ClassQuiz">GitHub</a
>
</li>
<li class="py-2">