Skip to content

Commit

Permalink
Merge pull request #187 from srikanth716/injiver-zing-wasm-library
Browse files Browse the repository at this point in the history
[INJIVER-641] add uniquekeys and magicNumber
  • Loading branch information
sree96 authored Oct 7, 2024
2 parents eef36d9 + fa39841 commit 90634cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useRef, useState } from "react";
import CameraAccessDenied from "./CameraAccessDenied";
import { ScanSessionExpiryTime } from "../../../utils/config";
import { MARKS_COUNT, ScanSessionExpiryTime } from "../../../utils/config";
import { useAppDispatch } from "../../../redux/hooks";
import {
goHomeScreen,
Expand Down Expand Up @@ -91,7 +91,7 @@ function QrScanner() {
.then((stream) => {
videoRef.current!!.srcObject = stream;
videoRef.current!!.disablePictureInPicture = true;
videoRef.current!!.playsInline = false;
videoRef.current!!.playsInline = true;
videoRef.current!!.controls = false;

videoRef.current!!.onloadeddata = () => {
Expand Down Expand Up @@ -161,7 +161,8 @@ function QrScanner() {
}
}, [scannerRef]);

const marks = Array.from({ length: 11 }, (_, i) => ({
const sliderMarks = Array.from({ length: MARKS_COUNT }, (_, i) => ({
key: `mark-${i}`,
value: i,
label: i % 2 === 0 ? `${i}` : "|",
}));
Expand Down Expand Up @@ -227,12 +228,13 @@ function QrScanner() {
{/* Slider */}
<div className="flex flex-col items-center space-y-2 w-60">
<Slider
key={`${zoomLevel}`}
aria-label="Zoom Level"
min={0}
max={10}
step={1}
value={zoomLevel}
marks={marks}
marks={sliderMarks}
valueLabelDisplay="on"
sx={{
color: "#FF7F00",
Expand Down
2 changes: 2 additions & 0 deletions inji-verify/src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,5 @@ export const InternetConnectivityCheckTimeout = isNaN(Number.parseInt(window._en
: Number.parseInt(window._env_.INTERNET_CONNECTIVITY_CHECK_TIMEOUT); //milliseconds

export const OvpQrHeader = window._env_.OVP_QR_HEADER;

export const MARKS_COUNT = 11;

0 comments on commit 90634cc

Please sign in to comment.