Added Qr scann on mobile Funtionalites

This commit is contained in:
Srinath 2026-02-20 15:33:02 +05:30
parent 374c76540f
commit 03ff3e0218
1 changed files with 12 additions and 0 deletions

View File

@ -19,6 +19,8 @@ import Search from "../../../../Components/Forms/Search";
import VoiceToTextItemCard from "../../../VoiceToText/VoiceToTextItemCard";
import { ApplicationPreferences } from "../../../../Features/BrachLogin/BranchLogin";
import { useDateStore } from "../../../../Features/BookingScreen/BookingData/DateStore";
import BarCodeScan from "../../../../Services/BarCodeScan";
import { isMobile } from "react-device-detect";
const BSNavbarSearchStandard = ({ inputRef }) => {
const dispatch = useDispatch();
@ -147,6 +149,9 @@ const BSNavbarSearchStandard = ({ inputRef }) => {
const handleSearch = (e) => {
dispatch(changeSearchedData(e?.target?.value));
};
const handleScan = (e) => {
dispatch(changeSearchedData(e));
};
const HandleVoiceSearch = () => {
setVoiceSearch(!voiceSearch);
};
@ -159,6 +164,13 @@ const BSNavbarSearchStandard = ({ inputRef }) => {
ref={inputRef}
value={ProdName}
/>
{isMobile && screenWidth <= 768 && (
<BarCodeScan
onScan={(value) => {
handleScan(value);
}}
/>
)}
</>
);
};