This commit is contained in:
frontend perkafean
2024-08-09 13:00:10 +00:00
parent 76741e304f
commit 6102db3f56
18 changed files with 271 additions and 141 deletions

View File

@@ -1,3 +1,4 @@
// src/CafePage.js
import React, { useState } from "react";
import { useParams, useSearchParams, useNavigate } from "react-router-dom";
@@ -11,9 +12,9 @@ import { updateLocalStorage } from "../helpers/localStorageHelpers";
function SearchResult({ user, shopItems, sendParam }) {
const [searchParams] = useSearchParams();
const { shopId, tableId } = useParams();
const { shopId, tableCode } = useParams();
const navigate = useNavigate();
sendParam({ shopId, tableId });
sendParam({ shopId, tableCode });
const [searchValue, setSearchValue] = useState(
"dwadawa vvwqd21qb13 4kfawfdwa dhawldhawr dliawbdjawndlks"
@@ -47,7 +48,7 @@ function SearchResult({ user, shopItems, sendParam }) {
<div style={{ marginTop: "5px" }}></div>
<SearchInput
shopId={shopId}
tableId={tableId}
tableCode={tableCode}
autofocus={true}
onSearchChange={handleSearchChange}
/>
@@ -68,4 +69,4 @@ function SearchResult({ user, shopItems, sendParam }) {
);
}
export default SearchResult;
export default SearchResult;