From 1b4f74db5cc2f8d9c96033d769b080e88456e50a Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Mon, 22 Jun 2026 17:40:43 +0000 Subject: [PATCH] Bob AI: Implemented player and admin login functionality with role-b --- src/pages/HomePage.tsx | 166 +++----------------- src/pages/HomePage/sections/Dashboard.tsx | 40 +++++ src/pages/HomePage/sections/Faq.tsx | 34 ++++ src/pages/HomePage/sections/Hero.tsx | 36 +++++ src/pages/HomePage/sections/Leaderboard.tsx | 29 ++++ src/pages/HomePage/sections/Levels.tsx | 37 +++++ src/pages/HomePage/sections/Login.tsx | 118 ++++++++++++++ 7 files changed, 314 insertions(+), 146 deletions(-) create mode 100644 src/pages/HomePage/sections/Dashboard.tsx create mode 100644 src/pages/HomePage/sections/Faq.tsx create mode 100644 src/pages/HomePage/sections/Hero.tsx create mode 100644 src/pages/HomePage/sections/Leaderboard.tsx create mode 100644 src/pages/HomePage/sections/Levels.tsx create mode 100644 src/pages/HomePage/sections/Login.tsx diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 9503231..76463dc 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -1,156 +1,30 @@ -import ContactCta from '@/components/sections/contact/ContactCta'; -import FaqTwoColumn from '@/components/sections/faq/FaqTwoColumn'; -import FeaturesMediaCards from '@/components/sections/features/FeaturesMediaCards'; -import HeroSplitMediaGrid from '@/components/sections/hero/HeroSplitMediaGrid'; -import MetricsMediaCards from '@/components/sections/metrics/MetricsMediaCards'; -import SocialProofMarquee from '@/components/sections/social-proof/SocialProofMarquee'; -import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; +// AUTO-GENERATED shell by per-section-migrate. +// Section bodies live in .//sections/.tsx. Edit the section +// files directly. Non-block content (wrappers, non-inlinable sections) is +// preserved inline; extracted section blocks become refs. -export default function HomePage() { +import React from 'react'; +import HeroSection from './HomePage/sections/Hero'; +import LevelsSection from './HomePage/sections/Levels'; +import LeaderboardSection from './HomePage/sections/Leaderboard'; +import FaqSection from './HomePage/sections/Faq'; +import DashboardSection from './HomePage/sections/Dashboard'; +import LoginSection from './HomePage/sections/Login'; + +export default function HomePage(): React.JSX.Element { return ( - <> -
- - - -
+<> + -
- - - -
+ -
- - - -
+ -
- - - -
+ -
- - - -
+ -
- - - -
+ ); } diff --git a/src/pages/HomePage/sections/Dashboard.tsx b/src/pages/HomePage/sections/Dashboard.tsx new file mode 100644 index 0000000..03553f7 --- /dev/null +++ b/src/pages/HomePage/sections/Dashboard.tsx @@ -0,0 +1,40 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "dashboard" section. + +import React from 'react'; +import MetricsMediaCards from '@/components/sections/metrics/MetricsMediaCards'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function DashboardSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Faq.tsx b/src/pages/HomePage/sections/Faq.tsx new file mode 100644 index 0000000..28c3d82 --- /dev/null +++ b/src/pages/HomePage/sections/Faq.tsx @@ -0,0 +1,34 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "faq" section. + +import React from 'react'; +import FaqTwoColumn from '@/components/sections/faq/FaqTwoColumn'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function FaqSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Hero.tsx b/src/pages/HomePage/sections/Hero.tsx new file mode 100644 index 0000000..ed0214a --- /dev/null +++ b/src/pages/HomePage/sections/Hero.tsx @@ -0,0 +1,36 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "hero" section. + +import React from 'react'; +import HeroSplitMediaGrid from '@/components/sections/hero/HeroSplitMediaGrid'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function HeroSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Leaderboard.tsx b/src/pages/HomePage/sections/Leaderboard.tsx new file mode 100644 index 0000000..4db0d2e --- /dev/null +++ b/src/pages/HomePage/sections/Leaderboard.tsx @@ -0,0 +1,29 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "leaderboard" section. + +import React from 'react'; +import SocialProofMarquee from '@/components/sections/social-proof/SocialProofMarquee'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function LeaderboardSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Levels.tsx b/src/pages/HomePage/sections/Levels.tsx new file mode 100644 index 0000000..85096bb --- /dev/null +++ b/src/pages/HomePage/sections/Levels.tsx @@ -0,0 +1,37 @@ +// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this +// file as the canonical source for the "levels" section. + +import React from 'react'; +import FeaturesMediaCards from '@/components/sections/features/FeaturesMediaCards'; +import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; + +export default function LevelsSection(): React.JSX.Element { + return ( +
+ + + +
+ ); +} diff --git a/src/pages/HomePage/sections/Login.tsx b/src/pages/HomePage/sections/Login.tsx new file mode 100644 index 0000000..bc5a31f --- /dev/null +++ b/src/pages/HomePage/sections/Login.tsx @@ -0,0 +1,118 @@ +/* eslint-disable */ +// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body +import Button from "@/components/ui/Button"; +import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; +import TextAnimation from "@/components/ui/TextAnimation"; +import ImageOrVideo from "@/components/ui/ImageOrVideo"; +import ScrollReveal from "@/components/ui/ScrollReveal"; +import Input from "@/components/ui/Input"; +import Label from "@/components/ui/Label"; +import { useState } from "react"; + +const LoginInline = () => { + const [role, setRole] = useState<'player' | 'admin'>('player'); + const [username, setUsername] = useState(''); + const [password, setPassword] = useState(''); + + const handleLogin = (e: React.FormEvent) => { + e.preventDefault(); + if (role === 'player') { + window.location.hash = '#levels'; + } else { + window.location.hash = '#dashboard'; + } + }; + + return ( +
+ +
+
+
+
+

Access Portal

+
+ + + + +
+
+ + +
+ + +
+ +
+
+ + setUsername(e.target.value)} + placeholder={role === 'admin' ? 'admin' : 'player123'} + required + className="w-full" + > +
+
+ + setPassword(e.target.value)} + placeholder="••••••••" + required + className="w-full" + > +
+
+ +
+
+
+
+
+ ); +}; + +export default function LoginSection() { + return ( +
+ +
+ ); +} -- 2.49.1