diff --git a/web-next/components/PostActions.tsx b/web-next/components/PostActions.tsx index 54d9ff7..a531b9b 100644 --- a/web-next/components/PostActions.tsx +++ b/web-next/components/PostActions.tsx @@ -120,11 +120,11 @@ export function PostActions({ return (
- setEditing(true)} className="second-brown"> + setEditing(true)} className="second-brown" style={{ cursor: 'pointer' }}> {t('edit')} {' '} - { if (!busy) remove() }} className="second-brown"> + { if (!busy) remove() }} className="second-brown" style={{ cursor: 'pointer' }}> {t('delete')} {error && {error}} diff --git a/web-next/components/SiteHeader.tsx b/web-next/components/SiteHeader.tsx index f1fcca7..184c604 100644 --- a/web-next/components/SiteHeader.tsx +++ b/web-next/components/SiteHeader.tsx @@ -1,8 +1,8 @@ 'use client' import { useState } from 'react' +import { useLocale } from 'next-intl' import { Link } from '@/i18n/navigation' -import { useRouter } from '@/i18n/navigation' const SERVER_NAME = 'NovaWoW' @@ -26,28 +26,19 @@ export function SiteHeader({ realmHref: string playersHref: string }) { - const router = useRouter() + const locale = useLocale() const [open, setOpen] = useState(false) - async function logout(e: React.MouseEvent) { - e.preventDefault() - await fetch('/api/auth/logout', { method: 'POST', credentials: 'same-origin' }) - router.push('/') - router.refresh() - } - return (
@@ -152,7 +141,7 @@ export function SiteHeader({ title={SERVER_NAME} /> - +