From 3bdc7687140c512ad95a0515587e64a1a5ee60de Mon Sep 17 00:00:00 2001 From: Jason Jordan Date: Tue, 29 Jul 2025 17:41:13 -0400 Subject: [PATCH] layouts and components, oh my! --- .../(informational)}/employers/index.tsx | 0 src/app/(informational)/layout.tsx | 58 ++++++++++ .../(informational)/members/indexold.tsx} | 4 +- src/app/(informational)/members/page.tsx | 49 +++++++++ src/{pages => app}/dashboard/broker/index.tsx | 0 src/app/dashboard/layout.tsx | 72 ++++++++++++ .../dashboard/member/indexold.tsx} | 64 +++++++++-- src/app/dashboard/member/page.tsx | 25 +++++ src/app/layout.tsx | 30 +++++ src/app/next_home_page.tsx | 103 ------------------ src/{pages/index.tsx => app/page.tsx} | 4 + src/app/test/basepage.tsx | 11 ++ src/app/test/sidenav.tsx | 35 ++++++ src/components/AccountDropdown.tsx | 2 + src/components/BenefitsAAGWidget.tsx | 55 ++++++++++ src/components/DashboardHeader.tsx | 36 ++++++ src/components/DashboardPieChart.tsx | 2 + src/components/DeductableProgressWidget.tsx | 29 +++++ src/components/DynamicIcon.tsx | 46 ++++++++ src/components/FindProvider.tsx | 57 ++++++++++ src/components/Footer.tsx | 1 - src/components/InfoCard.tsx | 2 - src/components/InlineLink.tsx | 2 - src/components/InsuranceCard.tsx | 29 +++++ src/components/LandingPage.tsx | 2 - src/components/LocationSearchInput.tsx | 3 +- src/components/Navbar.tsx | 1 - src/components/QuickAccessLinks.tsx | 48 ++++++++ src/components/RecentClaimsWidget.tsx | 96 ++++++++++++++++ src/components/SideNav.tsx | 65 +++++++++++ src/components/SideNavTemp.tsx | 49 +++++++++ src/components/Tagline.tsx | 2 - src/components/TextImage50.tsx | 3 - src/lib/dashboard.tsx | 50 +++++++++ src/middleware.ts | 13 +++ src/pages/{_app.tsx => _appold.tsx} | 0 36 files changed, 919 insertions(+), 129 deletions(-) rename src/{pages => app/(informational)}/employers/index.tsx (100%) create mode 100644 src/app/(informational)/layout.tsx rename src/{pages/members/index.tsx => app/(informational)/members/indexold.tsx} (93%) create mode 100644 src/app/(informational)/members/page.tsx rename src/{pages => app}/dashboard/broker/index.tsx (100%) create mode 100644 src/app/dashboard/layout.tsx rename src/{pages/dashboard/member/index.tsx => app/dashboard/member/indexold.tsx} (89%) create mode 100644 src/app/dashboard/member/page.tsx create mode 100644 src/app/layout.tsx delete mode 100644 src/app/next_home_page.tsx rename src/{pages/index.tsx => app/page.tsx} (97%) create mode 100644 src/app/test/basepage.tsx create mode 100644 src/app/test/sidenav.tsx create mode 100644 src/components/BenefitsAAGWidget.tsx create mode 100644 src/components/DashboardHeader.tsx create mode 100644 src/components/DeductableProgressWidget.tsx create mode 100644 src/components/DynamicIcon.tsx create mode 100644 src/components/FindProvider.tsx create mode 100644 src/components/InsuranceCard.tsx create mode 100644 src/components/QuickAccessLinks.tsx create mode 100644 src/components/RecentClaimsWidget.tsx create mode 100644 src/components/SideNav.tsx create mode 100644 src/components/SideNavTemp.tsx create mode 100644 src/lib/dashboard.tsx create mode 100644 src/middleware.ts rename src/pages/{_app.tsx => _appold.tsx} (100%) diff --git a/src/pages/employers/index.tsx b/src/app/(informational)/employers/index.tsx similarity index 100% rename from src/pages/employers/index.tsx rename to src/app/(informational)/employers/index.tsx diff --git a/src/app/(informational)/layout.tsx b/src/app/(informational)/layout.tsx new file mode 100644 index 0000000..4f12dbb --- /dev/null +++ b/src/app/(informational)/layout.tsx @@ -0,0 +1,58 @@ +import { headers } from "next/headers"; +import classnames from 'classnames'; +import Navbar from '@/components/Navbar'; +import Footer from '@/components/Footer'; + + +export default async function LandingPageLayout({ children }: { children: React.ReactNode }) { + const headersList = await headers(); + const pathname = headersList.get("x-current-path"); + const landingPageType = pathname?.split('/').pop() || ""; + const headerText = landingPageType.charAt(0).toUpperCase() + landingPageType.slice(1); + + return ( + <> + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {headerText} +
+
+
+
+
+
+
+ {children} +
+
+
+
+ + ) +} \ No newline at end of file diff --git a/src/pages/members/index.tsx b/src/app/(informational)/members/indexold.tsx similarity index 93% rename from src/pages/members/index.tsx rename to src/app/(informational)/members/indexold.tsx index 73a6c53..31d6ffc 100644 --- a/src/pages/members/index.tsx +++ b/src/app/(informational)/members/indexold.tsx @@ -1,5 +1,5 @@ -import LandingPage from '../../components/LandingPage'; -import InlineLink from "../../components/InlineLink"; +import LandingPage from '../../../components/LandingPage'; +import InlineLink from "../../../components/InlineLink"; // import TextImage50 from "../../components/TextImage50-50"; export default function Members() { diff --git a/src/app/(informational)/members/page.tsx b/src/app/(informational)/members/page.tsx new file mode 100644 index 0000000..eaf938c --- /dev/null +++ b/src/app/(informational)/members/page.tsx @@ -0,0 +1,49 @@ +import { Schibsted_Grotesk } from 'next/font/google' +import classnames from 'classnames'; +import InlineLink from "@/components/InlineLink"; +import QuickAccessLinks, { QuickLink } from '@/components/QuickAccessLinks'; + +const font = Schibsted_Grotesk({ subsets: ['latin'] }) + +const quickLinks: QuickLink[] = [ + { + display: "Login/Registration", + url: "/" + }, + { + display: "Link to Thing 1", + url: "/" + }, + { + display: "Link to Thing 2", + url: "/" + }, + { + display: "Link to another Thing", + url: "/" + } +] + + +export default function Members() { + return ( + <> + +
+ At Britton Benefit Services, LLC we're making employee benefits more affordable. In addition to the cost savings you receive when your employer chooses Britton Benefit Services, LLC we also make sure the important information you need is at your fingertips. +
+
+ That's why our member portal offers you 24/7 access to things like in-network provider lists, claim forms and prescription medication information. Select from any of the links below to get access to the benefit information and forms you need to file a claim, search for a provider or learn more about your benefits plan. +
+
+ At Britton Benefit Services, LLC we're making employee benefits more affordable. In addition to the cost savings you receive when your employer chooses Britton Benefit Services, LLC we also make sure the important information you need is at your fingertips. +
+
+ That's why our member portal offers you 24/7 access to things like in-network provider lists, claim forms and prescription medication information. Select from any of the links below to get access to the benefit information and forms you need to file a claim, search for a provider or learn more about your benefits plan. +
+ + ) +} \ No newline at end of file diff --git a/src/pages/dashboard/broker/index.tsx b/src/app/dashboard/broker/index.tsx similarity index 100% rename from src/pages/dashboard/broker/index.tsx rename to src/app/dashboard/broker/index.tsx diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx new file mode 100644 index 0000000..fee9a5f --- /dev/null +++ b/src/app/dashboard/layout.tsx @@ -0,0 +1,72 @@ +"user client" + +import { sideNavItems } from '@/lib/dashboard'; +import { headers } from "next/headers"; +import Script from 'next/script'; + +import AccountDropdown from '../../components/AccountDropdown'; +import SideNav from "@/components/SideNav"; +import DashboardHeader from "@/components/DashboardHeader"; +import Image from 'next/image'; +import classnames from 'classnames'; + + +export default async function DashboardLayout({ children }: { children: React.ReactNode }) { + const headersList = await headers(); + const pathname = headersList.get("x-current-path"); + const dashboardType = pathname?.split('/').pop() || ""; + const pageNavItems = sideNavItems[dashboardType]; + + return ( +
+