Skip to content

Commit

Permalink
feat: menambahkan kemudahan untuk attendance
Browse files Browse the repository at this point in the history
  • Loading branch information
reacto11mecha committed Oct 13, 2023
1 parent 77e152c commit 842683a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 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 @@ -24,16 +24,16 @@ const NormalScanner = ({
const qrScanner = new QrScanner(
videoRef.current,
({ 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);

participantAttend.mutate(data);
participantAttend.mutate(data);
}
},
{
highlightCodeOutline: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ScanningError = ({ message }: { message: string }) => {
justifyContent="center"
flexDirection="column"
>
<Heading as="h2" size="2xl" fontSize="4rem" color="white">
<Heading as="h2" size="2xl" fontSize="4rem" color="white" onClick={() => location.reload()}>
Gagal Absen!
</Heading>
<Heading
Expand Down

0 comments on commit 842683a

Please sign in to comment.