ok
This commit is contained in:
@@ -75,6 +75,7 @@ function App() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
|
console.log("gettingItems");
|
||||||
try {
|
try {
|
||||||
const { response, data } = await getItemTypesWithItems(shopId);
|
const { response, data } = await getItemTypesWithItems(shopId);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@@ -234,6 +235,7 @@ function App() {
|
|||||||
element={
|
element={
|
||||||
<>
|
<>
|
||||||
<SearchResult
|
<SearchResult
|
||||||
|
sendParam={handleSetParam}
|
||||||
user={user} // if logged
|
user={user} // if logged
|
||||||
shopItems={shopItems}
|
shopItems={shopItems}
|
||||||
guestSides={guestSides} // if being clerk
|
guestSides={guestSides} // if being clerk
|
||||||
|
|||||||
@@ -7,9 +7,10 @@ import SearchInput from "../components/SearchInput";
|
|||||||
import ItemLister from "../components/ItemLister";
|
import ItemLister from "../components/ItemLister";
|
||||||
import Header from "../components/Header";
|
import Header from "../components/Header";
|
||||||
|
|
||||||
function SearchResult({ user, shopItems }) {
|
function SearchResult({ user, shopItems, sendParam }) {
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
const { shopId } = useParams();
|
const { shopId } = useParams();
|
||||||
|
sendParam(shopId);
|
||||||
const [searchValue, setSearchValue] = useState(
|
const [searchValue, setSearchValue] = useState(
|
||||||
"dwadawa vvwqd21qb13 4kfawfdwa dhawldhawr dliawbdjawndlks",
|
"dwadawa vvwqd21qb13 4kfawfdwa dhawldhawr dliawbdjawndlks",
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user