diff --git a/eslint.config.mjs b/eslint.config.mjs index 615e92c..e7a69f3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,8 +5,6 @@ const eslintConfig = [ ...nextConfig, { rules: { - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], - '@typescript-eslint/no-explicit-any': 'warn', 'no-console': ['warn', { allow: ['warn', 'error'] }], }, }, diff --git a/src/app/(frontend)/lokatsii/dyvolis/page.tsx b/src/app/(frontend)/lokatsii/dyvolis/page.tsx index 5394bdb..d0621fe 100644 --- a/src/app/(frontend)/lokatsii/dyvolis/page.tsx +++ b/src/app/(frontend)/lokatsii/dyvolis/page.tsx @@ -11,7 +11,7 @@ export const revalidate = 60 async function getDyvoLisData() { try { const payload = await getPayload({ config: configPromise }) - return await payload.findGlobal({ slug: 'dyvolis-page', depth: 0 }) + return await payload.findGlobal({ slug: 'dyvolis-page', depth: 1 }) } catch { return null } @@ -38,7 +38,15 @@ export default async function DyvoLisPage() { statLabel={data?.heroStatLabel ?? undefined} tips={data?.heroTips?.map((t: { text: string }) => t.text)} /> - + { + if (!item.image || typeof item.image === 'string') return null + return item.image.url ?? null + }) + .filter((u: string | null): u is string => u !== null)} + /> 0 ? images : GALLERY const [active, setActive] = useState(0) - const n = GALLERY.length + const n = photos.length useEffect(() => { const t = setInterval(() => setActive((p) => (p + 1) % n), 3500) @@ -71,7 +74,7 @@ export function DyvoLisGallery({ className="relative mx-auto h-[260px] max-w-[1204px] lg:h-[400px]" style={{ perspective: '1100px' }} > - {GALLERY.map((src, i) => { + {photos.map((src, i) => { const d = getOffset(i) const absD = Math.abs(d) const sign = d >= 0 ? 1 : -1 @@ -139,7 +142,7 @@ export function DyvoLisGallery({
- {GALLERY.map((_, i) => ( + {photos.map((_, i) => (