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 1abdd97
Show file tree
Hide file tree
Showing 3 changed files with 14 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 @@ -24,16 +24,15 @@ 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,13 @@ 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 1abdd97

Please sign in to comment.