feat: refresh product page
This commit is contained in:
parent
3f9b0d57d1
commit
2585af6a28
1 changed files with 1 additions and 4 deletions
|
|
@ -74,13 +74,10 @@ export async function loader({
|
|||
}
|
||||
|
||||
export default function ProductPage() {
|
||||
const { products: initialProducts, error: initialError } =
|
||||
useLoaderData<LoaderData>();
|
||||
const { products, error } = useLoaderData<LoaderData>();
|
||||
const revalidator = useRevalidator();
|
||||
|
||||
const [products, setProducts] = useState(initialProducts);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(initialError);
|
||||
const [showCreateForm, setShowCreateForm] = useState(false);
|
||||
|
||||
const handlePageChange = (page: number) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue