How to fetch preview data for repeatable types using variables in NextJs

How to fetch the preview data for repeatable types.what is variable in fetch api

async function fetchAPI(query, { previewData, variables } = {}) {
const prismicAPI = await PrismicClient.getApi()
const res = await fetch(
headers: {
'Prismic-Ref': previewData?.ref || prismicAPI.masterRef.ref,
'Content-Type': 'application/json',
'Accept-Language': API_LOCALE,
Authorization: Token ${API_TOKEN},

Hi Asif,

We apologize for the long delay. This thread wasn't tracked correctly.

I don't know if we have managed to solve this issue, but we have released some new documentation for Next.js, and the way we fetch preview data has changed.

Please let us know if you need any other assistance,

This issue has been closed due to inactivity. Flag to reopen.