Skip to content

Commit

Permalink
feat: menambahkan sedikit kemudahan untuk reload desktop chooser
Browse files Browse the repository at this point in the history
  • Loading branch information
reacto11mecha committed Oct 1, 2023
1 parent 8385b58 commit 77e152c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ErrorOcurred: React.FC = () => {
alignItems="center"
justifyContent="center"
>
<Heading p={".6em"} color="red.500">
<Heading p={".6em"} color="red.500" onClick={() => location.reload()}>
Terjadi Kesalahan Internal
</Heading>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const InvalidCandidate = () => (
alignItems="center"
justifyContent="center"
>
<Heading p={".6em"} color="red.500">
<Heading p={".6em"} color="red.500" onClick={() => location.reload()}>
Profil Pemilihan Tidak Valid
</Heading>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ const NormalScanner = ({
const qrScanner = new QrScanner(
videoRef.current,
async ({ data }) => {
// Bug from QR Scanner
if (!data || data === "") return;
if (data || data !== "") {
qrScanner.stop();

qrScanner.stop();
const isValidQr = validateId(data);

const isValidQr = validateId(data);
if (!isValidQr) return setInvalidQr(true);

if (!isValidQr) return setInvalidQr(true);

checkParticipantMutation.mutate(data);
checkParticipantMutation.mutate(data);
}
},
{
highlightCodeOutline: true,
Expand Down

0 comments on commit 77e152c

Please sign in to comment.