Add new pages and refactor existing code
This commit adds new Admin and Accounts pages, while also improving code by refactoring various portions such as extracting services from the join page and dynamically importing packages in logging and monitoring code. The build command is also removed from the WordPress package, and SWC minification is enabled in the Next.js configuration. Updated marketing content is also included in this commit.
This commit is contained in:
35
apps/web/app/admin/_components/admin-sidebar.tsx
Normal file
35
apps/web/app/admin/_components/admin-sidebar.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Home, Users } from 'lucide-react';
|
||||
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
SidebarGroup,
|
||||
SidebarItem,
|
||||
} from '@kit/ui/sidebar';
|
||||
|
||||
import { AppLogo } from '~/components/app-logo';
|
||||
|
||||
export function AdminSidebar() {
|
||||
return (
|
||||
<Sidebar>
|
||||
<SidebarContent className={'py-4'}>
|
||||
<AppLogo href={'/admin'} />
|
||||
</SidebarContent>
|
||||
|
||||
<SidebarContent>
|
||||
<SidebarGroup label={'Admin'} collapsible={false}>
|
||||
<SidebarItem end path={'/admin'} Icon={<Home className={'h-4'} />}>
|
||||
Home
|
||||
</SidebarItem>
|
||||
|
||||
<SidebarItem
|
||||
path={'/admin/accounts'}
|
||||
Icon={<Users className={'h-4'} />}
|
||||
>
|
||||
Accounts
|
||||
</SidebarItem>
|
||||
</SidebarGroup>
|
||||
</SidebarContent>
|
||||
</Sidebar>
|
||||
);
|
||||
}
|
||||
0
apps/web/app/admin/accounts/[account]/page.tsx
Normal file
0
apps/web/app/admin/accounts/[account]/page.tsx
Normal file
10
apps/web/app/admin/accounts/page.tsx
Normal file
10
apps/web/app/admin/accounts/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
|
||||
export default function AccountsPage() {
|
||||
return (
|
||||
<>
|
||||
<PageHeader title={'Accounts'} />
|
||||
<PageBody></PageBody>;
|
||||
</>
|
||||
);
|
||||
}
|
||||
7
apps/web/app/admin/layout.tsx
Normal file
7
apps/web/app/admin/layout.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Page } from '@kit/ui/page';
|
||||
|
||||
import { AdminSidebar } from '~/admin/_components/admin-sidebar';
|
||||
|
||||
export default function AdminLayout(props: React.PropsWithChildren) {
|
||||
return <Page sidebar={<AdminSidebar />}>{props.children}</Page>;
|
||||
}
|
||||
11
apps/web/app/admin/page.tsx
Normal file
11
apps/web/app/admin/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PageBody, PageHeader } from '@kit/ui/page';
|
||||
|
||||
export default function AdminPage() {
|
||||
return (
|
||||
<>
|
||||
<PageHeader title={'Admin'} />
|
||||
|
||||
<PageBody></PageBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user