mirror of
https://github.com/ershisan99/vacancies-trends-front.git
synced 2026-02-02 05:12:07 +00:00
fix revalidate on params change
This commit is contained in:
@@ -2,7 +2,11 @@ import { json, MetaFunction } from '@remix-run/node'
|
|||||||
import { vacanciesService } from '~/services/vacancies/vacancies.service'
|
import { vacanciesService } from '~/services/vacancies/vacancies.service'
|
||||||
import { useLoaderData } from '@remix-run/react'
|
import { useLoaderData } from '@remix-run/react'
|
||||||
import { VacanciesChart } from '~/components/vacancies-chart'
|
import { VacanciesChart } from '~/components/vacancies-chart'
|
||||||
|
import type { ShouldRevalidateFunction } from '@remix-run/react'
|
||||||
|
|
||||||
|
export const shouldRevalidate: ShouldRevalidateFunction = ({ nextParams }) => {
|
||||||
|
return !nextParams
|
||||||
|
}
|
||||||
export const meta: MetaFunction = () => {
|
export const meta: MetaFunction = () => {
|
||||||
return [{ title: 'New Remix App' }, { name: 'description', content: 'Welcome to Remix!' }]
|
return [{ title: 'New Remix App' }, { name: 'description', content: 'Welcome to Remix!' }]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user