Compare commits
No commits in common. "f4e83f7eac4eb951cf4379c7bb5877d73fa90dc1" and "120450fd7c7e672acf5a409853d02a6e6a213a8f" have entirely different histories.
f4e83f7eac
...
120450fd7c
@ -34,7 +34,7 @@ export const PopupModal = ({
|
|||||||
className="fixed inset-0 bg-black/50 duration-300 ease-out data-[closed]:opacity-0"
|
className="fixed inset-0 bg-black/50 duration-300 ease-out data-[closed]:opacity-0"
|
||||||
transition
|
transition
|
||||||
/>
|
/>
|
||||||
<div className="fixed inset-0 flex w-screen justify-center overflow-y-auto p-0 max-sm:bg-white sm:items-center sm:p-4">
|
<div className="fixed inset-0 flex w-screen justify-center overflow-y-auto p-4 max-sm:bg-white sm:items-center">
|
||||||
<DialogPanel
|
<DialogPanel
|
||||||
transition
|
transition
|
||||||
className="max-w-lg space-y-6 rounded-lg bg-white p-8 duration-300 ease-out data-[closed]:scale-95 data-[closed]:opacity-0 sm:shadow-lg"
|
className="max-w-lg space-y-6 rounded-lg bg-white p-8 duration-300 ease-out data-[closed]:scale-95 data-[closed]:opacity-0 sm:shadow-lg"
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export const SuccessModal = ({ isOpen, onClose }: ModalProperties) => {
|
|||||||
className="fixed inset-0 bg-black/50 duration-300 ease-out data-[closed]:opacity-0"
|
className="fixed inset-0 bg-black/50 duration-300 ease-out data-[closed]:opacity-0"
|
||||||
transition
|
transition
|
||||||
/>
|
/>
|
||||||
<div className="fixed inset-0 flex w-screen justify-center overflow-y-auto p-0 max-sm:bg-white sm:items-center sm:p-4">
|
<div className="fixed inset-0 flex w-screen justify-center overflow-y-auto p-4 max-sm:bg-white sm:items-center">
|
||||||
<DialogPanel
|
<DialogPanel
|
||||||
className="max-w-lg space-y-6 rounded-lg bg-white p-8 duration-300 ease-out data-[closed]:scale-95 data-[closed]:opacity-0 sm:shadow-lg"
|
className="max-w-lg space-y-6 rounded-lg bg-white p-8 duration-300 ease-out data-[closed]:scale-95 data-[closed]:opacity-0 sm:shadow-lg"
|
||||||
transition
|
transition
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { MENU as ADMIN_MENU } from '~/layouts/admin/menu'
|
|||||||
|
|
||||||
export const APP = {
|
export const APP = {
|
||||||
title: 'LegalGo',
|
title: 'LegalGo',
|
||||||
description: 'LegalGo Platform Berita Dunia dan Indonesia.',
|
description: 'Legalgo Platform Berita Dunia dan Indonesia.',
|
||||||
logo: '/images/logo.png',
|
logo: '/images/logo.png',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Link, useFetcher, useRouteLoaderData } from 'react-router'
|
import { Link } from 'react-router'
|
||||||
|
|
||||||
import type { TCategorySchema } from '~/apis/common/get-categories'
|
import type { TCategorySchema } from '~/apis/common/get-categories'
|
||||||
import { CloseIcon } from '~/components/icons/close'
|
import { CloseIcon } from '~/components/icons/close'
|
||||||
import { MenuIcon } from '~/components/icons/menu'
|
import { MenuIcon } from '~/components/icons/menu'
|
||||||
import { Button } from '~/components/ui/button'
|
|
||||||
import { useNewsContext } from '~/contexts/news'
|
import { useNewsContext } from '~/contexts/news'
|
||||||
import { HeaderSearch } from '~/layouts/news/header-search'
|
import { HeaderSearch } from '~/layouts/news/header-search'
|
||||||
import type { loader } from '~/routes/_layout'
|
|
||||||
|
|
||||||
type THeaderMenuMobile = {
|
type THeaderMenuMobile = {
|
||||||
menu?: TCategorySchema['data']
|
menu?: TCategorySchema['data']
|
||||||
@ -17,9 +15,6 @@ export default function HeaderMenuMobile(properties: THeaderMenuMobile) {
|
|||||||
const { menu } = properties
|
const { menu } = properties
|
||||||
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
const [isMenuOpen, setIsMenuOpen] = useState(false)
|
||||||
const { setIsLoginOpen } = useNewsContext()
|
const { setIsLoginOpen } = useNewsContext()
|
||||||
const loaderData = useRouteLoaderData<typeof loader>('routes/_layout')
|
|
||||||
const userData = loaderData?.userData
|
|
||||||
const fetcher = useFetcher()
|
|
||||||
|
|
||||||
const handleToggleMenu = (): void => {
|
const handleToggleMenu = (): void => {
|
||||||
setIsMenuOpen(!isMenuOpen)
|
setIsMenuOpen(!isMenuOpen)
|
||||||
@ -64,31 +59,15 @@ export default function HeaderMenuMobile(properties: THeaderMenuMobile) {
|
|||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{userData ? (
|
<button
|
||||||
<fetcher.Form
|
|
||||||
method="POST"
|
|
||||||
action="/actions/logout"
|
|
||||||
>
|
|
||||||
<Button
|
|
||||||
variant="newsSecondary"
|
|
||||||
className="w-full bg-white px-[35px] py-3 text-center text-[#2E2F7C] sm:hidden"
|
|
||||||
type="submit"
|
|
||||||
>
|
|
||||||
Logout
|
|
||||||
</Button>
|
|
||||||
</fetcher.Form>
|
|
||||||
) : (
|
|
||||||
<Button
|
|
||||||
variant="newsSecondary"
|
|
||||||
className="w-full bg-white px-[35px] py-3 text-center text-[#2E2F7C] sm:hidden"
|
className="w-full bg-white px-[35px] py-3 text-center text-[#2E2F7C] sm:hidden"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsMenuOpen(false)
|
|
||||||
setIsLoginOpen(true)
|
setIsLoginOpen(true)
|
||||||
|
setIsMenuOpen(false)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Masuk
|
Akun
|
||||||
</Button>
|
</button>
|
||||||
)}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -23,10 +23,13 @@ export const HeaderTop = () => {
|
|||||||
className="h-3/4 w-auto sm:h-full"
|
className="h-3/4 w-auto sm:h-full"
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="hidden h-full items-center py-1.5 text-2xl font-light whitespace-pre-line sm:flex">
|
<div className="hidden h-full items-center py-1.5 font-light whitespace-pre-line sm:flex">
|
||||||
{APP.description}
|
{APP.description}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-[15px]">
|
<div className="flex items-center gap-[15px]">
|
||||||
|
<Button className="h-8 w-auto rounded-none px-3 text-xs sm:h-[50px] sm:w-[150px] sm:text-lg">
|
||||||
|
About Us
|
||||||
|
</Button>
|
||||||
{userData ? (
|
{userData ? (
|
||||||
<fetcher.Form
|
<fetcher.Form
|
||||||
method="POST"
|
method="POST"
|
||||||
|
|||||||
@ -40,7 +40,7 @@ export const AdminLoginPage = () => {
|
|||||||
<div className="flex min-h-dvh min-w-dvw flex-col items-center justify-center space-y-8">
|
<div className="flex min-h-dvh min-w-dvw flex-col items-center justify-center space-y-8">
|
||||||
<div className="grid max-w-lg items-center justify-center space-y-7 rounded-[20px] border border-[#E6E6E6] bg-white p-8">
|
<div className="grid max-w-lg items-center justify-center space-y-7 rounded-[20px] border border-[#E6E6E6] bg-white p-8">
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<Link to="/">
|
<Link to="/lg-admin">
|
||||||
<img
|
<img
|
||||||
src={APP.logo}
|
src={APP.logo}
|
||||||
alt={APP.title}
|
alt={APP.title}
|
||||||
@ -100,6 +100,18 @@ export const AdminLoginPage = () => {
|
|||||||
</RemixFormProvider>
|
</RemixFormProvider>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/* Link Daftar */}
|
||||||
|
<div className="mt-4 text-center text-sm">
|
||||||
|
Belum punya akun?{' '}
|
||||||
|
<Button
|
||||||
|
onClick={() => {}}
|
||||||
|
className="font-semibold text-[#2E2F7C]"
|
||||||
|
variant="link"
|
||||||
|
size="fit"
|
||||||
|
>
|
||||||
|
Daftar Disini
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user