fix: ppid dinamic route
This commit is contained in:
parent
0dde0f7613
commit
c1dd47999b
|
|
@ -28,7 +28,7 @@ export default function RootLayout({
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning className="scroll-smooth">
|
||||||
<head />
|
<head />
|
||||||
<body
|
<body
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { FbIcon, Hotline, IgIcon, Location, Mail, TtIcon, TwIcon, WorldIcon, YtI
|
||||||
export default function FooterPPID() {
|
export default function FooterPPID() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div id='footer-ppid' className='scroll-auto w-full bg-[#1F1A17] flex flex-col md:grid md:grid-cols-3 lg:grid-cols-4 gap-0 md:gap-3 lg:gap-7 p-2 lg:p-16 text-sm'>
|
<div id='footer-ppid' className='scroll-smooth w-full bg-[#1F1A17] flex flex-col md:grid md:grid-cols-3 lg:grid-cols-4 gap-0 md:gap-3 lg:gap-7 p-2 lg:p-16 text-sm'>
|
||||||
<div className=' flex-col hidden lg:block'>
|
<div className=' flex-col hidden lg:block'>
|
||||||
<img src="/e-ppid.png" alt="logo" />
|
<img src="/e-ppid.png" alt="logo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,43 +5,95 @@ import React from 'react'
|
||||||
|
|
||||||
export default function PublicInformation() {
|
export default function PublicInformation() {
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const currentPath = pathname;
|
const newPathname = pathname.split('/')[3]
|
||||||
|
const isPolda = pathname.split('/')[2] == "polda"
|
||||||
|
let isPolri;
|
||||||
|
let linkHref1;
|
||||||
|
let linkHref2;
|
||||||
|
let linkHref3;
|
||||||
|
let linkHref4;
|
||||||
|
let linkHref5;
|
||||||
|
let linkHref6;
|
||||||
|
|
||||||
|
if (pathname.includes("/satuan-kerja")) {
|
||||||
|
isPolri = "SATKER";
|
||||||
|
linkHref1 = `/portal-ppid/satuan-kerja/${newPathname}/informasi-publik/informasi-serta-merta`
|
||||||
|
linkHref2 = `/portal-ppid/satuan-kerja/${newPathname}/informasi-publik/informasi-berkala`
|
||||||
|
linkHref3 = `/portal-ppid/satuan-kerja/${newPathname}/informasi-publik/informasi-setiap-saat`
|
||||||
|
linkHref4 = `/portal-ppid/satuan-kerja/${newPathname}/informasi-publik/informasi-dikecualikan`
|
||||||
|
linkHref5 = `/portal-ppid/satuan-kerja/${newPathname}/informasi-publik/penerangan-satuan`
|
||||||
|
linkHref6 = `/portal-ppid/satuan-kerja/${newPathname}/informasi-publik/uu-dan-peraturan`
|
||||||
|
} else if (pathname.includes("/polda")) {
|
||||||
|
isPolri = "POLDA";
|
||||||
|
linkHref1 = `/portal-ppid/polda/${newPathname}/informasi-publik/informasi-serta-merta`
|
||||||
|
linkHref2 = `/portal-ppid/polda/${newPathname}/informasi-publik/informasi-berkala`
|
||||||
|
linkHref3 = `/portal-ppid/polda/${newPathname}/informasi-publik/informasi-setiap-saat`
|
||||||
|
linkHref4 = `/portal-ppid/polda/${newPathname}/informasi-publik/informasi-dikecualikan`
|
||||||
|
linkHref5 = `/portal-ppid/polda/${newPathname}/informasi-publik/penerangan-satuan`
|
||||||
|
linkHref6 = `/portal-ppid/polda/${newPathname}/informasi-publik/uu-dan-peraturan`
|
||||||
|
} else {
|
||||||
|
isPolri = "POLRI";
|
||||||
|
linkHref1 = "/portal-ppid/informasi-publik/informasi-serta-merta"
|
||||||
|
linkHref2 = "/portal-ppid/informasi-publik/informasi-berkala"
|
||||||
|
linkHref3 = "/portal-ppid/informasi-publik/informasi-setiap-saat"
|
||||||
|
linkHref4 = "/portal-ppid/informasi-publik/informasi-dikecualikan"
|
||||||
|
linkHref5 = "/portal-ppid/informasi-publik/penerangan-satuan"
|
||||||
|
linkHref6 = "/portal-ppid/informasi-publik/uu-dan-peraturan"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
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>{isPolri}</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'>
|
<Link href={linkHref1}>
|
||||||
<div><img src="/infopublik1.png" alt="logo" /></div>
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
<div>Informasi Serta Merta</div>
|
<div><img src="/infopublik1.png" alt="logo" /></div>
|
||||||
</div>
|
<div>Informasi Serta Merta</div>
|
||||||
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
</div>
|
||||||
<div><img src="/infopublik2.png" alt="logo" /></div>
|
</Link>
|
||||||
<div>Informasi Berkala</div>
|
<Link href={linkHref2}>
|
||||||
</div>
|
<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="/infopublik2.png" alt="logo" /></div>
|
||||||
<div><img src="/infopublik3.png" alt="logo" /></div>
|
<div>Informasi Berkala</div>
|
||||||
<div>Informasi Setiap Saat</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
<Link href={linkHref3}>
|
||||||
<div><img src="/infopublik4.png" alt="logo" /></div>
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
<div>Penerangan Dikecualikan</div>
|
<div><img src="/infopublik3.png" alt="logo" /></div>
|
||||||
</div>
|
<div>Informasi Setiap Saat</div>
|
||||||
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
</div>
|
||||||
<div><img src="/infopublik5.png" alt="logo" /></div>
|
</Link>
|
||||||
<div>Penerangan Satuan</div>
|
<Link href={linkHref4}>
|
||||||
</div>
|
<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="/infopublik4.png" alt="logo" /></div>
|
||||||
<div><img src="/infopublik6.png" alt="logo" /></div>
|
<div>Penerangan Dikecualikan</div>
|
||||||
<div>UU & Peraturan</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
<Link href={linkHref5}>
|
||||||
<div><img src="/informasipublik7.png" alt="logo" /></div>
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
<div>Satu Data</div>
|
<div><img src="/infopublik5.png" alt="logo" /></div>
|
||||||
</div>
|
<div>Penerangan Satuan</div>
|
||||||
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
</div>
|
||||||
<div><img src="/infopublik8.png" alt="logo" /></div>
|
</Link>
|
||||||
<div>PUSIKNAS</div>
|
<Link href={linkHref6}>
|
||||||
</div>
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
|
<div><img src="/infopublik6.png" alt="logo" /></div>
|
||||||
|
<div>UU & Peraturan</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
<Link href={`https://data.polri.go.id/`} target='_blank'>
|
||||||
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
|
<div><img src="/informasipublik7.png" alt="logo" /></div>
|
||||||
|
<div>Satu Data</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
<Link href={`https://pusiknas.polri.go.id/`} target='_blank'>
|
||||||
|
<div className='flex flex-col items-center gap-2 p-3 bg-[#DD8306] rounded-md'>
|
||||||
|
<div><img src="/infopublik8.png" alt="logo" /></div>
|
||||||
|
<div>PUSIKNAS</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
{/* <div className='space-y-4 px-2'>
|
{/* <div className='space-y-4 px-2'>
|
||||||
<div className='md:flex items-center text-white bg-[#DD8306] p-4 rounded-md'>
|
<div className='md:flex items-center text-white bg-[#DD8306] p-4 rounded-md'>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use client'
|
'use client'
|
||||||
import { Input } from '@nextui-org/input';
|
import { Input } from '@nextui-org/input';
|
||||||
import { Navbar, NavbarContent, NavbarItem, NavbarMenuToggle } from '@nextui-org/navbar';
|
import { Navbar, NavbarContent, NavbarItem, NavbarMenuToggle } from '@nextui-org/navbar';
|
||||||
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, autocomplete } from '@nextui-org/react';
|
import { Button, Dropdown, DropdownItem, DropdownMenu, DropdownSection, DropdownTrigger, autocomplete } from '@nextui-org/react';
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { ChevronDownIcon, ChevronRightIcon, ChevronRightWhite, FbIcon, IdnIcon, IgIcon, SearchIcon, TtIcon, TwIcon, YtIcon } from '../icons';
|
import { ChevronDownIcon, ChevronRightIcon, ChevronRightWhite, FbIcon, IdnIcon, IgIcon, SearchIcon, TtIcon, TwIcon, YtIcon } from '../icons';
|
||||||
import { ThemeSwitch } from '../theme-switch';
|
import { ThemeSwitch } from '../theme-switch';
|
||||||
|
|
@ -28,7 +28,7 @@ export default function NavbarHumas() {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Navbar maxWidth='full' height="8rem" className='dark:bg-[#1F1A17]'>
|
<Navbar isBordered maxWidth='full' height="8rem" className='dark:bg-[#1F1A17]'>
|
||||||
<div className='w-full h-full flex'>
|
<div className='w-full h-full flex'>
|
||||||
<div className='min-w-max md:w-1/12 flex items-center justify-center'>
|
<div className='min-w-max md:w-1/12 flex items-center justify-center'>
|
||||||
<Link href={'/'}>
|
<Link href={'/'}>
|
||||||
|
|
@ -82,7 +82,7 @@ export default function NavbarHumas() {
|
||||||
</NavbarItem>
|
</NavbarItem>
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
// aria-label="tentang"
|
// aria-label="tentang"
|
||||||
// title='Tentang'
|
title='Tentang'
|
||||||
className="pt-4"
|
className="pt-4"
|
||||||
classNames={{
|
classNames={{
|
||||||
// base: "flex",
|
// base: "flex",
|
||||||
|
|
@ -94,42 +94,41 @@ export default function NavbarHumas() {
|
||||||
base: "w-[350px]"
|
base: "w-[350px]"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
// endContent={<ChevronRightWhite />}
|
|
||||||
>
|
|
||||||
<Link href='/tentang-humas-polri' className='flex justify-between'>
|
<Link href='/tentang-humas-polri' className='flex justify-between'>
|
||||||
Tentang Humas POLRI
|
Tentang Humas POLRI
|
||||||
<ChevronRightWhite />
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}
|
<Link href='/profile-pimpinan-polri' className='flex justify-between'>
|
||||||
>
|
|
||||||
<Link href='/profile-pimpinan-polri'>
|
|
||||||
Profile Pimpinan POLRI
|
Profile Pimpinan POLRI
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='/struktur-organisasi' className='flex justify-between'>
|
||||||
<Link href='/struktur-organisasi'>
|
|
||||||
Struktur Organisasi
|
Struktur Organisasi
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='/visi-misi' className='flex justify-between'>
|
||||||
<Link href='/visi-misi'>
|
|
||||||
Visi & Misi
|
Visi & Misi
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='/tugas-dan-fungsi' className='flex justify-between'>
|
||||||
<Link href='/tugas-dan-fungsi'>
|
|
||||||
Tugas & Fungsi
|
Tugas & Fungsi
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='#' className='flex justify-between'>
|
||||||
Logo
|
Logo
|
||||||
|
<ChevronRightIcon />
|
||||||
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
|
|
@ -161,73 +160,71 @@ export default function NavbarHumas() {
|
||||||
base: "w-[350px]"
|
base: "w-[350px]"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}
|
<Link href={'/form-permohonan-informasi'} className='flex justify-between'>
|
||||||
>
|
|
||||||
<Link href={'/form-permohonan-informasi'}>
|
|
||||||
Formulir Permohonan Informasi
|
Formulir Permohonan Informasi
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}
|
<Link href='https://www.digitalkorlantas.id/sim/' target="_blank" className='flex justify-between'>
|
||||||
>
|
|
||||||
<Link href='https://www.digitalkorlantas.id/sim/' target="_blank">
|
|
||||||
Pelayanan SIM
|
Pelayanan SIM
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://erikkes.id/' target="_blank" className='flex justify-between'>
|
||||||
<Link href='https://erikkes.id/' target="_blank">
|
|
||||||
Pelayanan e-Rikkes SIM
|
Pelayanan e-Rikkes SIM
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://eppsi.id/' target="_blank" className='flex justify-between'>
|
||||||
<Link href='https://eppsi.id/' target="_blank">
|
|
||||||
Pelayanan Test Psikologi SIM
|
Pelayanan Test Psikologi SIM
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href="https://e-avis.korlantas.polri.go.id/" target='_blank' className='flex justify-between'>
|
||||||
<Link href="https://e-avis.korlantas.polri.go.id/" target='_blank'>
|
|
||||||
Pelayanan e-Arvis
|
Pelayanan e-Arvis
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href="https://samsatdigital.id/" target='_blank' className='flex justify-between'>
|
||||||
<Link href="https://samsatdigital.id/" target='_blank'>
|
|
||||||
Pelayanan Samsat Digital
|
Pelayanan Samsat Digital
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://play.google.com/store/apps/details?id=superapps.polri.presisi.presisi&hl=en_US' target='_blank' className='flex justify-between'>
|
||||||
<Link href='https://play.google.com/store/apps/details?id=superapps.polri.presisi.presisi&hl=en_US' target='_blank'>
|
|
||||||
Pelayanan SKCK
|
Pelayanan SKCK
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://play.google.com/store/apps/details?id=com.stk.pengaduanpropam' target='_blank' className='flex justify-between'>
|
||||||
<Link href='https://play.google.com/store/apps/details?id=com.stk.pengaduanpropam' target='_blank'>
|
|
||||||
Pelayanan Propam Presisi
|
Pelayanan Propam Presisi
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://dumaspresisi.polri.go.id/' target='_blank' className='flex justify-between'>
|
||||||
<Link href='https://dumaspresisi.polri.go.id/' target='_blank'>
|
|
||||||
Pelayanan Dumas Presisi
|
Pelayanan Dumas Presisi
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://bos.polri.go.id/login' target='_blank' className='flex justify-between'>
|
||||||
<Link href='https://bos.polri.go.id/login' target='_blank'>
|
|
||||||
Pelayanan Binmas
|
Pelayanan Binmas
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
<DropdownItem
|
<DropdownItem>
|
||||||
endContent={<ChevronRightWhite />}>
|
<Link href='https://play.google.com/store/apps/details?id=id.go.ssdmpolri.pengaduanappsbarupolri2' target='_blank' className='flex justify-between'>
|
||||||
<Link href='https://play.google.com/store/apps/details?id=id.go.ssdmpolri.pengaduanappsbarupolri2' target='_blank'>
|
|
||||||
Whistle Blower System
|
Whistle Blower System
|
||||||
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|
|
||||||
|
|
@ -303,7 +303,7 @@ export default function NavbarPPID() {
|
||||||
</Link>
|
</Link>
|
||||||
</NavbarItem>
|
</NavbarItem>
|
||||||
<NavbarItem>
|
<NavbarItem>
|
||||||
<Link href='#footer-ppid' color='foreground'>
|
<Link href='#footer-ppid' className='scroll-smooth' color='foreground'>
|
||||||
Kontak
|
Kontak
|
||||||
</Link>
|
</Link>
|
||||||
</NavbarItem>
|
</NavbarItem>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export default function NavbarSatker() {
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const newPathname = pathname.split('/')[3]
|
const newPathname = pathname.split('/')[3]
|
||||||
const isPolda = pathname.split('/')[2] == "polda"
|
const isPolda = pathname.split('/')[2] == "polda"
|
||||||
console.log(isPolda, "polda");
|
// console.log(isPolda, "polda");
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue