I have a orders/page.tsx
and orders/[id]/page.tsx
. Orders page.tsx is just a server side component which has a table that shows name, phone number, total price, status, edit button of orders. id page.tsx opens single order. It is a client side component. Here you can change the status of the order and after clicking Save button, it sends put request to server and router.push('/orders')
. But my orders page table still shows old data (with old status). How can I force my orders/page.tsx
to fetch new data after changing status in orders/[id]/page.tsx
?