diff --git a/app/layouts/menu.ts b/app/layouts/menu.ts index ba008f3..715d445 100644 --- a/app/layouts/menu.ts +++ b/app/layouts/menu.ts @@ -8,31 +8,31 @@ import { XIcon } from '~/components/icons/x' export const MENU = [ { title: 'Spotlight', - url: '/news/topic?category=spotlight', + url: '/news/category/spotlight', }, { title: 'Berita', - url: '/news/topic?category=berita', + url: '/news/category/berita', }, { title: 'Kasus', - url: '/news/topic?category=kasus', + url: '/news/category/kasus', }, { title: 'Kajian', - url: '/news/topic?category=kajian', + url: '/news/category/kajian', }, { title: 'Lifestyle', - url: '/news/topic?category=lifestyle', + url: '/news/category/lifestyle', }, { title: 'Event', - url: '/news/topic?category=event', + url: '/news/category/event', }, { title: 'Travel', - url: '/news/topic?category=travel', + url: '/news/category/travel', }, ] diff --git a/app/pages/news/data.ts b/app/pages/news/data.ts index df53c39..f63ec5c 100644 --- a/app/pages/news/data.ts +++ b/app/pages/news/data.ts @@ -42,6 +42,7 @@ export const BERITA: TNews = { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros.', featured: '/images/news-4.jpg', tags: ['Hukum Property', 'PREMIUM CONTENT'], + isPremium: true, slug: 'helping-a-local-business-reinvent-itself', }, ], diff --git a/app/routes/_layout.news.categories.$slug.tsx b/app/routes/_layout.news.category.$name.tsx similarity index 100% rename from app/routes/_layout.news.categories.$slug.tsx rename to app/routes/_layout.news.category.$name.tsx diff --git a/app/types/news.ts b/app/types/news.ts index 35e6b99..bb9ff12 100644 --- a/app/types/news.ts +++ b/app/types/news.ts @@ -2,7 +2,10 @@ export type TNews = { title: string description: string type: 'hero' | 'grid' - items: Pick[] + items: Pick< + TNewsDetail, + 'title' | 'content' | 'featured' | 'slug' | 'tags' | 'isPremium' + >[] } export type TNewsDetail = { @@ -13,5 +16,6 @@ export type TNewsDetail = { date: Date slug: string tags?: Array + isPremium?: boolean categories?: Array }