🥅 Catching an error more efficiently
This commit is contained in:
@@ -28,9 +28,10 @@ export const start_game = async (id: string) => {
|
|||||||
alertModal.subscribe((_) => {
|
alertModal.subscribe((_) => {
|
||||||
window.location.assign('/account/login?returnTo=/dashboard');
|
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`);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -159,8 +159,9 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="py-2">
|
<li class="py-2">
|
||||||
<a
|
<a
|
||||||
|
target="_blank"
|
||||||
class="text-lg font-medium lg:px-4 text-gray-600 hover:text-green-600 link-hover"
|
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>
|
||||||
<li class="py-2">
|
<li class="py-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user