Restructure application to use /home for authenticated pages
- Move authenticated home page from /[locale] to /[locale]/home - Move login page from /[locale]/login to /[locale] (new landing page) - Move all restricted pages (bill, location, year-month, print, account) under /[locale]/home - Simplify middleware to protect all routes under /home instead of using publicPages array - Update auth config: change signIn page from /login to / - Update SignInButton callback URL to redirect to /home after login - Update all internal links throughout the application to reflect new structure - Update server action redirects in navigationActions.ts - Public share routes (/share/*) remain unchanged 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
app/[locale]/home/account/page.tsx
Normal file
28
app/[locale]/home/account/page.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { FC } from 'react';
|
||||
import { Main } from '@/app/ui/Main';
|
||||
import Link from 'next/link';
|
||||
import SettingsIcon from "@mui/icons-material/Settings";
|
||||
import AccountCircle from "@mui/icons-material/AccountCircle";
|
||||
import { getTranslations, getLocale } from 'next-intl/server';
|
||||
import { LogoutButton } from './LogoutButton';
|
||||
|
||||
const Page: FC = async () => {
|
||||
const t = await getTranslations('account-page');
|
||||
const locale = await getLocale();
|
||||
|
||||
return (
|
||||
<Main>
|
||||
<div className="flex flex-col items-center">
|
||||
<div className="card card-compact card-bordered min-w-[20em] max-w-[90em] bg-base-100 shadow-s my-1">
|
||||
<div className="card-body">
|
||||
<h2 className="card-title"><AccountCircle /> {t('title')}</h2>
|
||||
<Link href={`/${locale}/home/account/settings`} className='btn btn-neutral'><SettingsIcon /> {t('settings-button')}</Link>
|
||||
<LogoutButton />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Main>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
Reference in New Issue
Block a user