Skip to content

Commit

Permalink
chore: no-store for (/api/is-eligible-ai)
Browse files Browse the repository at this point in the history
  • Loading branch information
arshad-yaseen committed Nov 13, 2023
1 parent caf1f05 commit bd49907
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/(editor)/edit/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client"

import { useEffect, useState } from "react"
import { cache, useEffect, useState } from "react"
import {
editorActiveSectionState,
editorCodesState,
Expand Down Expand Up @@ -63,6 +63,10 @@ export default function page({ params }: { params: { id: string } }) {
// Check if the user is eligible for AI - make a request to the API
const response = await fetch(`/api/user/eligible-for-ai`, {
method: "GET",
next: {
revalidate: 0
},
cache: "no-store"
})
const resJson = await response.json()
setIsEligibleForAI(resJson.isEligibleForAI)
Expand Down

0 comments on commit bd49907

Please sign in to comment.