fix: detail content tbnews kaltara
This commit is contained in:
parent
7df5abf346
commit
03baade7ea
|
|
@ -3,6 +3,7 @@
|
|||
import { Reveal } from "@/components/landing-page/Reveal";
|
||||
import { Icon } from "@/components/ui/icon";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { Link } from "@/i18n/routing";
|
||||
import { listData } from "@/service/landing/landing";
|
||||
import { formatDateToIndonesian, getPublicLocaleTimestamp } from "@/utils/globals";
|
||||
import Image from "next/image";
|
||||
|
|
@ -11,14 +12,18 @@ import React, { useEffect, useState } from "react";
|
|||
|
||||
const HeroKaltara = () => {
|
||||
const params = useParams();
|
||||
const poldaName: any = params?.polda_name;
|
||||
const [content, setContent] = useState([]);
|
||||
const [centerPadding, setCenterPadding] = useState<any>();
|
||||
const [isBannerLoading, setIsBannerLoading] = useState(true);
|
||||
const poldaName: any = params?.polda_name;
|
||||
const satkerName = params?.satker_name;
|
||||
|
||||
let prefixPath = poldaName ? `/tbnews/${poldaName}` : satkerName ? `/satker/${satkerName}` : "/";
|
||||
|
||||
const newContent = [
|
||||
{
|
||||
id: 1,
|
||||
slug: "Brigjen-Pol-Wibowo",
|
||||
thumbnailLink: "/assets/tbnews/image-hero1.png",
|
||||
title: "Brigjen Pol Wibowo Resmi Dilantik sebagai Dirregident Korlantas Polri",
|
||||
categoryName: "NASIONAL",
|
||||
|
|
@ -120,9 +125,11 @@ const HeroKaltara = () => {
|
|||
</div>
|
||||
) : (
|
||||
<div className="w-full lg:h-full">
|
||||
{newContent?.slice(0, 1).map((row: any, index: number) => (
|
||||
{content?.map((row: any, index: number) => (
|
||||
<div className="flex flex-col gap-3" key={index}>
|
||||
<Image src={row?.thumbnailLink} alt="gambar-utama" width={1920} height={1080} className="w-full h-[310px] lg:h-[520px] rounded-sm object-cover" />
|
||||
<Link href={prefixPath + `/video/detail/${row.slug}`}>
|
||||
<Image src={row?.thumbnailLink} alt="gambar-utama" width={1920} height={1080} className="w-full h-[310px] lg:h-[520px] rounded-sm object-cover" />
|
||||
</Link>
|
||||
<h1 className="font-bold text-xl">{row.title}</h1>
|
||||
<div className="flex flex-row gap-3">
|
||||
<p className="text-[#c03724] text-sm">{row?.categoryName}</p>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Icon } from "@/components/ui/icon";
|
||||
import { Link } from "@/i18n/routing";
|
||||
|
|
@ -42,7 +44,7 @@ const categoryLinks: any = {
|
|||
Kesehatan: "https://tribratanews.kaltara.polri.go.id/category/kesehatan/",
|
||||
Olahraga: "https://tribratanews.kaltara.polri.go.id/category/olahraga/",
|
||||
PPA: "https://tribratanews.kaltara.polri.go.id/category/ppa/",
|
||||
MediaHub: "https://mediahub.polri.go.id/",
|
||||
MediaHub: "https://new.netidhub.com/",
|
||||
};
|
||||
|
||||
const NavbarKaltara = () => {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import NavbarKaltara from "../../../components/navbar-kaltara";
|
||||
import ContactUs from "../../../components/contact-us";
|
||||
import NewsTickerKaltara from "../../../components/news-tickers-kaltara";
|
||||
|
||||
const layout = async ({ children }: { children: React.ReactNode }) => {
|
||||
return (
|
||||
<>
|
||||
<NavbarKaltara />
|
||||
{children}
|
||||
<ContactUs />
|
||||
<NewsTickerKaltara />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default layout;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -92,7 +92,7 @@ const Hero: React.FC = () => {
|
|||
width={1920}
|
||||
height={1080}
|
||||
placeholder={`data:image/svg+xml;base64,${toBase64(shimmer(700, 475))}`}
|
||||
className="w-full lg:w-[850px] h-[310px] lg:h-[420px] rounded-lg object-cover"
|
||||
className="w-full h-[310px] lg:h-[420px] rounded-lg object-cover"
|
||||
/>
|
||||
|
||||
<div className="absolute bottom-0 left-0 right-0 bg-transparent backdrop-blur-sm text-black dark:text-white p-4 rounded-b-lg">
|
||||
|
|
|
|||
Loading…
Reference in New Issue