diff --git a/apps/web/app/(main)/dashboard/page.tsx b/apps/web/app/(main)/dashboard/page.tsx new file mode 100644 index 0000000..b8fb679 --- /dev/null +++ b/apps/web/app/(main)/dashboard/page.tsx @@ -0,0 +1,3 @@ +export default function DashboardPage() { + return 'Dashboard'; +} diff --git a/apps/web/app/(main)/layout.tsx b/apps/web/app/(main)/layout.tsx new file mode 100644 index 0000000..038c98f --- /dev/null +++ b/apps/web/app/(main)/layout.tsx @@ -0,0 +1,11 @@ +import { BottomNav } from '@/components/navigation'; +import { type PropsWithChildren } from 'react'; + +export default async function Layout({ children }: Readonly) { + return ( +
+
{children}
+ +
+ ); +} diff --git a/apps/web/app/(main)/masters/page.tsx b/apps/web/app/(main)/masters/page.tsx new file mode 100644 index 0000000..cfc23ee --- /dev/null +++ b/apps/web/app/(main)/masters/page.tsx @@ -0,0 +1,3 @@ +export default function MastersPage() { + return 'Masters'; +} diff --git a/apps/web/app/(main)/page.tsx b/apps/web/app/(main)/page.tsx new file mode 100644 index 0000000..cb723f3 --- /dev/null +++ b/apps/web/app/(main)/page.tsx @@ -0,0 +1,5 @@ +import { redirect } from 'next/navigation'; + +export default async function Profile() { + redirect('/dashboard'); +} diff --git a/apps/web/app/(main)/profile/page.tsx b/apps/web/app/(main)/profile/page.tsx new file mode 100644 index 0000000..74455a0 --- /dev/null +++ b/apps/web/app/(main)/profile/page.tsx @@ -0,0 +1,8 @@ +'use client'; +import { initData, useSignal } from '@telegram-apps/sdk-react'; + +export default function ProfilePage() { + const initDataState = useSignal(initData.state); + + return JSON.stringify(initDataState, null, 2); +} diff --git a/apps/web/app/(main)/records/add/page.tsx b/apps/web/app/(main)/records/add/page.tsx new file mode 100644 index 0000000..4b8196a --- /dev/null +++ b/apps/web/app/(main)/records/add/page.tsx @@ -0,0 +1,3 @@ +export default function AddRecordsPage() { + return 'Add Records'; +} diff --git a/apps/web/app/(main)/records/page.tsx b/apps/web/app/(main)/records/page.tsx new file mode 100644 index 0000000..061b3a7 --- /dev/null +++ b/apps/web/app/(main)/records/page.tsx @@ -0,0 +1,3 @@ +export default function RecordsPage() { + return 'Records'; +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 1fb90c2..f1fd866 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,7 +1,8 @@ -import { Root } from '@/components/telegram'; +// import { Root as TelegramRoot } from '@/components/telegram'; import { I18nProvider } from '@/utils/i18n/provider'; import { type Metadata } from 'next'; import { getLocale } from 'next-intl/server'; +import '@repo/ui/globals.css'; import { type PropsWithChildren } from 'react'; export const metadata: Metadata = { @@ -16,7 +17,9 @@ export default async function RootLayout({ children }: Readonly - {children} + {/* */} + {children} + {/* */} diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx deleted file mode 100644 index a21501b..0000000 --- a/apps/web/app/page.tsx +++ /dev/null @@ -1,14 +0,0 @@ -'use client'; - -import { initData, isMiniAppDark, useSignal } from '@telegram-apps/sdk-react'; - -export default function InitDataPage() { - const initDataState = useSignal(initData.state); - const isDark = isMiniAppDark(); - - return ( - - {JSON.stringify(initDataState, null, 2)} - - ); -} diff --git a/apps/web/components/navigation/index.tsx b/apps/web/components/navigation/index.tsx new file mode 100644 index 0000000..f5899d0 --- /dev/null +++ b/apps/web/components/navigation/index.tsx @@ -0,0 +1 @@ +export * from './navbar'; diff --git a/apps/web/components/navigation/nav-button.tsx b/apps/web/components/navigation/nav-button.tsx new file mode 100644 index 0000000..9141105 --- /dev/null +++ b/apps/web/components/navigation/nav-button.tsx @@ -0,0 +1,26 @@ +'use client'; +import { Button } from '@repo/ui/components/ui/button'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +type NavButtonProps = { + readonly href: string; + readonly icon: React.ReactNode; + readonly label: string; +}; + +export function NavButton({ href, icon, label }: NavButtonProps) { + const pathname = usePathname(); + return ( + + ); +} diff --git a/apps/web/components/navigation/navbar.tsx b/apps/web/components/navigation/navbar.tsx new file mode 100644 index 0000000..9f366cf --- /dev/null +++ b/apps/web/components/navigation/navbar.tsx @@ -0,0 +1,16 @@ +import { NavButton } from './nav-button'; +import { BookOpen, Newspaper, PlusCircle, User, Users } from 'lucide-react'; + +export function BottomNav() { + return ( + + ); +} diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js index 80f68f9..9f9cba4 100644 --- a/apps/web/eslint.config.js +++ b/apps/web/eslint.config.js @@ -7,5 +7,8 @@ export default [ ...tailwindConfig, { ignores: ['**/graphql/types.ts', '**/schema.graphql'], + rules:{ + 'react/forbid-component-props':0 + } }, ]; diff --git a/apps/web/package.json b/apps/web/package.json index 069c7c4..7de1306 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,6 +19,7 @@ "@repo/ui": "workspace:*", "@telegram-apps/sdk-react": "^2.0.19", "graphql": "catalog:", + "lucide-react": "catalog:", "next": "catalog:", "next-intl": "^3.26.0", "react": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae27eb3..c65ad23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -149,6 +149,9 @@ importers: graphql: specifier: 'catalog:' version: 16.9.0 + lucide-react: + specifier: 'catalog:' + version: 0.462.0(react@19.0.0) next: specifier: 'catalog:' version: 15.1.0(@babel/core@7.26.0)(@playwright/test@1.49.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)