fix: dinamic ppid welcome banner
This commit is contained in:
parent
ed9a857fa3
commit
0dde0f7613
|
|
@ -7,21 +7,8 @@ export default function PublicInformation() {
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const currentPath = pathname;
|
const currentPath = pathname;
|
||||||
|
|
||||||
let targetPath;
|
|
||||||
if (currentPath.includes('/satuan-kerja')) {
|
|
||||||
// Jika path adalah '/portal-ppid', arahkan ke '/portal-ppid/informasi-publik'
|
|
||||||
targetPath = '/portal-ppid/informasi-publik/informasi-serta-merta';
|
|
||||||
} {
|
|
||||||
// Jika path adalah '/portal-ppid/satuan-kerja/div-humas', arahkan ke '/portal-ppid/satuan-kerja/div-humas/informasi-publik'
|
|
||||||
targetPath = '/portal-ppid/satuan-kerja/div-humas/informasi-publik/informasi-serta-merta';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='bg-[#E2E2E2] text-black p-1 md:p-4'>
|
<div className='bg-[#E2E2E2] text-black p-1 md:p-4'>
|
||||||
<div className='text-lg font-semibold underline underline-offset-8 decoration-red-600 pb-5'>
|
|
||||||
{targetPath} <br />
|
|
||||||
{currentPath}
|
|
||||||
</div>
|
|
||||||
<div className='grid grid-col-2 md:grid-cols-3 lg:grid-cols-4 gap-4 text-white font-semibold text-md'>
|
<div className='grid grid-col-2 md:grid-cols-3 lg:grid-cols-4 gap-4 text-white font-semibold text-md'>
|
||||||
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
<div><img src="/infopublik1.png" alt="logo" /></div>
|
<div><img src="/infopublik1.png" alt="logo" /></div>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,22 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { Input } from "@nextui-org/input";
|
import { Input } from "@nextui-org/input";
|
||||||
import { SearchIcon } from "../icons";
|
import { SearchIcon } from "../icons";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
interface PPIDBannerProps {
|
interface PPIDBannerProps {
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PPIDBanner({ url }: PPIDBannerProps) {
|
export default function PPIDBanner({ url }: PPIDBannerProps) {
|
||||||
|
const pathname = usePathname()
|
||||||
|
let isPolri;
|
||||||
|
|
||||||
|
if (pathname === "/portal-ppid") {
|
||||||
|
isPolri = true;
|
||||||
|
} else {
|
||||||
|
isPolri = false;
|
||||||
|
}
|
||||||
|
console.log(isPolri)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className=' bg-white relative'>
|
<div className=' bg-white relative'>
|
||||||
|
|
@ -17,7 +27,7 @@ export default function PPIDBanner({ url }: PPIDBannerProps) {
|
||||||
/>
|
/>
|
||||||
<div className="absolute top-5 lg:top-1/3 left-1/2 w-[48%] text-white">
|
<div className="absolute top-5 lg:top-1/3 left-1/2 w-[48%] text-white">
|
||||||
<p className='text-xs md:text-md lg:text-4xl font-bold leanding-0 md:leading-10'>
|
<p className='text-xs md:text-md lg:text-4xl font-bold leanding-0 md:leading-10'>
|
||||||
SELAMAT DATANG DI PORTAL E-PPID {url}
|
{`SELAMAT DATANG DI PORTAL E-PPID ${isPolri ? 'POLRI' : url}`}
|
||||||
</p>
|
</p>
|
||||||
<p className='text-xs font-medium lg:font-semibold pt-1 lg:pt-3'>
|
<p className='text-xs font-medium lg:font-semibold pt-1 lg:pt-3'>
|
||||||
Layanan ini merupakan fasilitas daring yang disediakan bagi para pemohon informasi publik, sebagai bagian dari implementasi prinsip keterbukaan informasi publik di Pusat Informasi dan Dokumentasi (PPID) Utama.
|
Layanan ini merupakan fasilitas daring yang disediakan bagi para pemohon informasi publik, sebagai bagian dari implementasi prinsip keterbukaan informasi publik di Pusat Informasi dan Dokumentasi (PPID) Utama.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue