feat: restructure routing and layouts for admin and news sections, update cookie paths
This commit is contained in:
@@ -9,7 +9,7 @@ export const FooterNewsletter = () => {
|
||||
<div className="col-span-2 hidden gap-y-6 sm:grid">
|
||||
<div className="h-[75px] bg-white p-3">
|
||||
<Link
|
||||
to="/news"
|
||||
to="/"
|
||||
className="h-full"
|
||||
>
|
||||
<img
|
||||
@@ -44,7 +44,7 @@ export const FooterNewsletter = () => {
|
||||
<div className="block sm:hidden">
|
||||
<div className="h-[60px] bg-white p-3">
|
||||
<Link
|
||||
to="/news"
|
||||
to="/"
|
||||
className="h-full"
|
||||
>
|
||||
<img
|
||||
|
||||
@@ -67,7 +67,7 @@ export const FormLogin = (properties: TProperties) => {
|
||||
method="post"
|
||||
onSubmit={handleSubmit}
|
||||
className="space-y-4"
|
||||
action="/actions/news/login"
|
||||
action="/actions/login"
|
||||
>
|
||||
<Input
|
||||
id="email"
|
||||
|
||||
@@ -3,17 +3,17 @@ import { Link, useFetcher, useRouteLoaderData } from 'react-router'
|
||||
import { Button } from '~/components/ui/button'
|
||||
import { APP } from '~/configs/meta'
|
||||
import { useNewsContext } from '~/contexts/news'
|
||||
import type { loader } from '~/routes/_layout.news'
|
||||
import type { loader } from '~/routes/_layout'
|
||||
|
||||
export const HeaderTop = () => {
|
||||
const { setIsLoginOpen } = useNewsContext()
|
||||
const loaderData = useRouteLoaderData<typeof loader>('routes/_layout.news')
|
||||
const loaderData = useRouteLoaderData<typeof loader>('routes/_layout')
|
||||
const fetcher = useFetcher()
|
||||
|
||||
return (
|
||||
<div className="flex h-[60px] items-center justify-between bg-white px-5 align-middle sm:h-[100px] sm:gap-[15px] sm:px-[50px] sm:py-[20px]">
|
||||
<Link
|
||||
to="/news"
|
||||
to="/"
|
||||
className="mt-2 h-full py-2"
|
||||
>
|
||||
<img
|
||||
@@ -32,7 +32,7 @@ export const HeaderTop = () => {
|
||||
{loaderData?.userToken ? (
|
||||
<fetcher.Form
|
||||
method="POST"
|
||||
action="/actions/news/logout"
|
||||
action="/actions/logout"
|
||||
>
|
||||
<Button
|
||||
variant="newsSecondary"
|
||||
|
||||
+20
-20
@@ -21,31 +21,31 @@ type TFooterMenu = {
|
||||
export const MENU: TMenu[] = [
|
||||
{
|
||||
title: 'Spotlight',
|
||||
url: '/news/category/spotlight',
|
||||
url: '/category/spotlight',
|
||||
},
|
||||
{
|
||||
title: 'Berita',
|
||||
url: '/news/category/berita',
|
||||
url: '/category/berita',
|
||||
},
|
||||
{
|
||||
title: 'Kasus',
|
||||
url: '/news/category/kasus',
|
||||
url: '/category/kasus',
|
||||
},
|
||||
{
|
||||
title: 'Kajian',
|
||||
url: '/news/category/kajian',
|
||||
url: '/category/kajian',
|
||||
},
|
||||
{
|
||||
title: 'Lifestyle',
|
||||
url: '/news/category/lifestyle',
|
||||
url: '/category/lifestyle',
|
||||
},
|
||||
{
|
||||
title: 'Event',
|
||||
url: '/news/category/event',
|
||||
url: '/category/event',
|
||||
},
|
||||
{
|
||||
title: 'Travel',
|
||||
url: '/news/category/travel',
|
||||
url: '/category/travel',
|
||||
},
|
||||
]
|
||||
|
||||
@@ -55,23 +55,23 @@ export const FOOTER_MENU: TFooterMenu[] = [
|
||||
items: [
|
||||
{
|
||||
title: 'Popular',
|
||||
url: '/news/list?sort=popular',
|
||||
url: '/list?sort=popular',
|
||||
},
|
||||
{
|
||||
title: 'Trending',
|
||||
url: '/news/list?sort=trending',
|
||||
url: '/list?sort=trending',
|
||||
},
|
||||
{
|
||||
title: 'Contact',
|
||||
url: '/news/contact',
|
||||
url: '/contact',
|
||||
},
|
||||
{
|
||||
title: 'Support/Help',
|
||||
url: '/news/support',
|
||||
url: '/support',
|
||||
},
|
||||
{
|
||||
title: 'Rquest Topic',
|
||||
url: '/news/request-topic',
|
||||
url: '/request-topic',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -80,23 +80,23 @@ export const FOOTER_MENU: TFooterMenu[] = [
|
||||
items: [
|
||||
{
|
||||
title: 'FAQs',
|
||||
url: '/news/faq',
|
||||
url: '/faq',
|
||||
},
|
||||
{
|
||||
title: 'Terms and Condition',
|
||||
url: '/news/terms-condition',
|
||||
url: '/terms-condition',
|
||||
},
|
||||
{
|
||||
title: 'Support',
|
||||
url: '/news/support',
|
||||
url: '/support',
|
||||
},
|
||||
{
|
||||
title: 'Link Nine',
|
||||
url: '/news',
|
||||
url: '/',
|
||||
},
|
||||
{
|
||||
title: 'Link Ten',
|
||||
url: '/news',
|
||||
url: '/',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -130,14 +130,14 @@ export const FOOTER_MENU: TFooterMenu[] = [
|
||||
export const COPYRIGHT_MENU: TMenu[] = [
|
||||
{
|
||||
title: 'Privacy Policy',
|
||||
url: '/news/privacy-policy',
|
||||
url: '/privacy-policy',
|
||||
},
|
||||
{
|
||||
title: 'Terms of Service',
|
||||
url: '/news/terms-of-service',
|
||||
url: '/terms-of-service',
|
||||
},
|
||||
{
|
||||
title: 'Cookies Settings',
|
||||
url: '/news/cookies-settings',
|
||||
url: '/cookies-settings',
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user