diff --git a/app/api/slider-photos/route.ts b/app/api/slider-photos/route.ts new file mode 100644 index 0000000..4008151 --- /dev/null +++ b/app/api/slider-photos/route.ts @@ -0,0 +1,14 @@ +import { NextResponse } from "next/server"; +import { readSliderPhotos } from "@/lib/slider-photos"; + +export const runtime = "nodejs"; +export const dynamic = "force-dynamic"; + +export async function GET() { + try { + const photos = readSliderPhotos(); + return NextResponse.json(photos); + } catch { + return NextResponse.json([]); + } +} diff --git a/app/components/tvone-content.tsx b/app/components/tvone-content.tsx index 2169405..5247935 100644 --- a/app/components/tvone-content.tsx +++ b/app/components/tvone-content.tsx @@ -294,9 +294,6 @@ export function TvoneFooter() {
Sobre a TV ONE
tvone
-- Informação e entretenimento para Angola e para quem acompanha a atualidade. -
diff --git a/app/components/tvone-promo-strip.tsx b/app/components/tvone-promo-strip.tsx index c5d59b8..9decd94 100644 --- a/app/components/tvone-promo-strip.tsx +++ b/app/components/tvone-promo-strip.tsx @@ -1,141 +1,129 @@ +"use client"; + import Image from "next/image"; -import Link from "next/link"; +import { useCallback, useEffect, useState } from "react"; -const PROMO_IMG_LEFT = - "https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?w=800&q=80&auto=format&fit=crop"; -const PROMO_IMG_RIGHT = - "https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?w=800&q=80&auto=format&fit=crop"; +import type { SliderPhoto } from "@/lib/slider-photos"; + +const ROTATE_MS = 5500; + +function PromoStripSingleSlide({ + photos, + activeIndex, +}: { + photos: SliderPhoto[]; + activeIndex: number; +}) { + const n = photos.length; -function IconFacebook({ className }: { className?: string }) { return ( - +
- - Seguro Saúde Mulher - - — cuidado que acompanha o seu ritmo. -
- - Saber mais - - → - - -