diff --git a/app/[locale]/(protected)/contributor/content/audio/page.tsx b/app/[locale]/(protected)/contributor/content/audio/page.tsx index 7b5f1a8a..a0f31679 100644 --- a/app/[locale]/(protected)/contributor/content/audio/page.tsx +++ b/app/[locale]/(protected)/contributor/content/audio/page.tsx @@ -5,7 +5,6 @@ import { Link, UploadIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Icon } from "@iconify/react/dist/iconify.js"; import TableAudio from "./components/table-audio"; -import TableVideo from "../audio-visual/components/table-video"; const ReactTableAudioPage = () => { return ( diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx b/app/[locale]/(protected)/contributor/content/video/components/columns.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx rename to app/[locale]/(protected)/contributor/content/video/components/columns.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/components/table-video.tsx b/app/[locale]/(protected)/contributor/content/video/components/table-video.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/components/table-video.tsx rename to app/[locale]/(protected)/contributor/content/video/components/table-video.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/create/page.tsx b/app/[locale]/(protected)/contributor/content/video/create/page.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/create/page.tsx rename to app/[locale]/(protected)/contributor/content/video/create/page.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/layout.tsx b/app/[locale]/(protected)/contributor/content/video/layout.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/layout.tsx rename to app/[locale]/(protected)/contributor/content/video/layout.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/page.tsx b/app/[locale]/(protected)/contributor/content/video/page.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/page.tsx rename to app/[locale]/(protected)/contributor/content/video/page.tsx diff --git a/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx b/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx index 78696d28..dbc37e38 100644 --- a/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx +++ b/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx @@ -4,7 +4,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { UploadIcon } from "lucide-react"; import TaskTable from "../../task/components/task-table"; import MediahubTable from "./components/mediahub-table"; -import TicketingTable from "../../ticketing/components/table"; const MediahubPage = async () => { return ( diff --git a/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx index 1107fb0d..e30eb803 100644 --- a/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx +++ b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx @@ -1,7 +1,6 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import MedsosTable from "./components/medsos-table"; -import TicketingTable from "../../ticketing/components/table"; const MedsosMediahubPage = async () => { return ( diff --git a/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx b/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx index 5da19f92..388c321c 100644 --- a/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx @@ -3,7 +3,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import FormTask from "@/components/form/task/task-form"; import FormPressConference from "@/components/form/schedule/press-conference-form"; -const PressConCreatePage = async () => { +const PressConCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx b/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx index fb904a27..f7c5fc34 100644 --- a/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx @@ -7,7 +7,7 @@ import FormDetailPressConference from "@/components/form/schedule/press-conferen import { useParams } from "next/navigation"; import { id } from "date-fns/locale"; -const PressConDetailPage = async () => { +const PressConDetailPage = () => { const params = useParams(); const id = params?.id; return ( diff --git a/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx b/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx index fe24fb7b..767af43f 100644 --- a/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx @@ -4,7 +4,7 @@ import FormTask from "@/components/form/task/task-form"; import FormPressConference from "@/components/form/schedule/press-conference-form"; import FormPressRelease from "@/components/form/schedule/pers-release-form"; -const PressReleaseCreatePage = async () => { +const PressReleaseCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/contributor/task/create/page.tsx b/app/[locale]/(protected)/contributor/task/create/page.tsx index 8531305f..2897575a 100644 --- a/app/[locale]/(protected)/contributor/task/create/page.tsx +++ b/app/[locale]/(protected)/contributor/task/create/page.tsx @@ -2,7 +2,7 @@ import { Card, CardContent } from "@/components/ui/card"; import SiteBreadcrumb from "@/components/site-breadcrumb"; import FormTask from "@/components/form/task/task-form"; -const TaskCreatePage = async () => { +const TaskCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx b/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx index 9c51de4c..259779ac 100644 --- a/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx +++ b/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx @@ -1,8 +1,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; -import FormInternal from "@/components/form/communication/internal-form"; import FormCollaboration from "@/components/form/communication/collaboration-form"; -const CollaborationCreatePage = async () => { +const CollaborationCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/shared/communication/internal/create/page.tsx b/app/[locale]/(protected)/shared/communication/internal/create/page.tsx index ddb27415..b66787ed 100644 --- a/app/[locale]/(protected)/shared/communication/internal/create/page.tsx +++ b/app/[locale]/(protected)/shared/communication/internal/create/page.tsx @@ -1,7 +1,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import FormInternal from "@/components/form/communication/internal-form"; -const InternalCreatePage = async () => { +const InternalCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/shared/communication/page.tsx b/app/[locale]/(protected)/shared/communication/page.tsx index 9a98b41f..2a542701 100644 --- a/app/[locale]/(protected)/shared/communication/page.tsx +++ b/app/[locale]/(protected)/shared/communication/page.tsx @@ -1,5 +1,3 @@ -import { StatisticsBlock } from "@/components/blocks/statistics-block"; -import DashboardDropdown from "@/components/dashboard-dropdown"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import InternalTable from "./internal/components/internal-table"; @@ -8,7 +6,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import CollaborationTable from "./collaboration/components/collabroation-table"; import EscalationTable from "./escalation/table-escalation/escalation-table"; -const CommunicationPage = async () => { +const CommunicationPage = () => { return (
diff --git a/app/[locale]/(protected)/shared/contest/page.tsx b/app/[locale]/(protected)/shared/contest/page.tsx index db520189..da967231 100644 --- a/app/[locale]/(protected)/shared/contest/page.tsx +++ b/app/[locale]/(protected)/shared/contest/page.tsx @@ -1,11 +1,8 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { UploadIcon } from "lucide-react"; -import PressReleaseTable from "../schedule/press-conference/components/presscon-table"; -import { Button } from "@/components/ui/button"; import ContestTable from "./components/contest-table"; -const ContestPage = async () => { +const ContestPage = () => { return (
diff --git a/app/[locale]/(protected)/shared/curated-content/page.tsx b/app/[locale]/(protected)/shared/curated-content/page.tsx index ef4a069e..5509506b 100644 --- a/app/[locale]/(protected)/shared/curated-content/page.tsx +++ b/app/[locale]/(protected)/shared/curated-content/page.tsx @@ -26,7 +26,7 @@ import ImageSliderPage from "./giat-routine/image"; import TeksSliderPage from "./giat-routine/teks"; import ContestTable from "../contest/components/contest-table"; -const CuratedContentPage = async () => { +const CuratedContentPage = () => { return (
diff --git a/app/[locale]/(public)/video/filter/page.tsx b/app/[locale]/(public)/video/filter/page.tsx index 36f5b145..d4835e28 100644 --- a/app/[locale]/(public)/video/filter/page.tsx +++ b/app/[locale]/(public)/video/filter/page.tsx @@ -4,7 +4,7 @@ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, Pagi import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; -import { getListContent, getVideoData } from "@/service/landing/landing"; +import { getListContent } from "@/service/landing/landing"; import { formatDateToIndonesian } from "@/utils/globals"; const dummyImage = [ diff --git a/components/partials/footer/index.tsx b/components/partials/footer/index.tsx index 4d54d40f..c55c1e85 100644 --- a/components/partials/footer/index.tsx +++ b/components/partials/footer/index.tsx @@ -1,3 +1,5 @@ +"use client" + import React from 'react' import FooterContent from './footer-content' import { Link } from "@/components/navigation" @@ -5,8 +7,15 @@ import Image from 'next/image' import { Icon } from "@/components/ui/icon"; import { auth } from '@/lib/auth' -const DashCodeFooter = async () => { - const session = await auth() +const DashCodeFooter = () => { + + const [session, setSession] = React.useState(); + + const initSession = async () => { + const ses = await auth(); + setSession(ses); + } + return (
diff --git a/components/partials/header/index.tsx b/components/partials/header/index.tsx index 8f6314a6..7ad108a1 100644 --- a/components/partials/header/index.tsx +++ b/components/partials/header/index.tsx @@ -1,3 +1,5 @@ +"use client" + import React from "react"; import HeaderContent from "./header-content"; import HeaderSearch from "./header-search"; @@ -12,7 +14,7 @@ import HorizontalMenu from "./horizontal-menu"; import LocalSwitcher from "./locale-switcher"; import HeaderLogo from "./header-logo"; -const DashCodeHeader = async () => { +const DashCodeHeader = () => { return ( <> diff --git a/components/partials/header/profile-info.tsx b/components/partials/header/profile-info.tsx index 097272f5..66e48c8f 100644 --- a/components/partials/header/profile-info.tsx +++ b/components/partials/header/profile-info.tsx @@ -15,10 +15,16 @@ import { Icon } from "@/components/ui/icon"; import { signOut, auth } from "@/lib/auth"; import Image from "next/image"; import { Link } from "@/i18n/routing"; -import { Button } from "@/components/ui/button"; +import React from "react"; -const ProfileInfo = async () => { - const session = await auth(); +const ProfileInfo = () => { + + const [session, setSession] = React.useState(); + + const initSession = async () => { + const ses = await auth(); + setSession(ses); + } return (
diff --git a/service/landing/landing.ts b/service/landing/landing.ts index 3daa96e6..90912e27 100644 --- a/service/landing/landing.ts +++ b/service/landing/landing.ts @@ -8,9 +8,9 @@ export async function getCategoryData() { return await httpGetInterceptor(`media/categories/list/publish?enablePage=1&sort=desc&sortBy=updatedAt&size=12&type=`); } -export async function getListContent(data: { sortBy: string; contentTypeId: string; size: number; page: number }) { +export async function getListContent(props: any) { return await httpGetInterceptor( - `media/public/list?enablePage=1&sort=desc&sortBy=${data.sortBy}&size=${data.size}&page=${data.page}&typeId=${data.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=` + `media/public/list?enablePage=1&sort=desc&sortBy=${props.sortBy}&size=${props.size}&page=${props.page}&typeId=${props.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=` ); }