Skip to content

Commit 3f66b00

Browse files
authored
No cache policy - for earn api request (#1850)
* axios no cache policy * force dynamic
1 parent 7c1a2bc commit 3f66b00

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/earn/layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export const metadata = {
1717
}
1818

1919
export default async function Layout({ children }: LayoutProps) {
20-
const productsResponse = await getApiV2ProductsEarn()
20+
const productsResponse = await getApiV2ProductsEarn({
21+
headers: { 'Cache-Control': 'no-cache' },
22+
})
2123
const products =
2224
productsResponse.status === 200
2325
? productsResponse.data.sort((a, b) => a.order - b.order)
@@ -54,3 +56,5 @@ export default async function Layout({ children }: LayoutProps) {
5456
</div>
5557
)
5658
}
59+
60+
export const dynamic = 'force-dynamic'

0 commit comments

Comments
 (0)