Skip to content

Commit

Permalink
chore: fixing usestate statement to address errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BuyankhuuTsCAl committed Oct 12, 2023
1 parent 2f485e4 commit 1ea3940
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/storefront/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ import { getProduct, filterProduct } from './helperFunction';
import { GlobalStyle, ButtonsContainer } from './styles';
import ProductButtons from './productButtons';

interface Product {
description: string;
category: string;
quantity: number;
photo: string;
product_id: number;
name: string;
updated_at: Date;
}
// https://codesandbox.io/s/filter-with-react-button-r5x4i?file=/src/App.js
export default function App() {
const buttons = [
Expand All @@ -30,7 +39,7 @@ export default function App() {
count: 3,
},
];
const [filtredProduct, setFiltredProducts] = useState(null);
const [filtredProduct, setFiltredProducts] = useState<null | Product[]>(null);
const [isClicked, setisClicked] = useState(false);

return (
Expand Down

0 comments on commit 1ea3940

Please sign in to comment.