Skylight

diff --git a/app/page.tsx b/app/page.tsx index 65022b18..e7d77bc3 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,5 +1,19 @@ import { Dashboard } from "@/app/dashboard"; -export default async function page() { - return ; +export default function Page({ + searchParams, +}: { + searchParams: { [key: string]: string | string[] | undefined } +}) { + + console.log("searchParams: ", searchParams); + + let platform; + if (typeof searchParams.platform === 'string') { + platform = searchParams.platform as string; + } + return ( + + ); } + From 7d66588294d4984e3c5d94fe5a45d98de3203001 Mon Sep 17 00:00:00 2001 From: Dan Mosedale Date: Mon, 17 Mar 2025 14:03:21 -0700 Subject: [PATCH 07/26] Update TODO.md --- TODO.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 5c0df5c7..e4f80034 100644 --- a/TODO.md +++ b/TODO.md @@ -46,7 +46,7 @@ User Story: As a mobile PM, I should be able to understand what things are in ex 3. Create new dir with new page.tsx (MUST) - 4. TDD Factor out dashboard (prob MUST) + 4. TDD Factor out dashboard (STARTED) 5. Factor "application=" out of env (MUST) 6. Add cases / refactor messageUtils.getDashboard (MUST) 7. Add cases / refactor experimentUtils.ts (MUST) From 8c0df3bb8a3ccaa8a4d9e0057f1b2f1b4d86492b Mon Sep 17 00:00:00 2001 From: Dan Mosedale Date: Mon, 17 Mar 2025 15:42:57 -0700 Subject: [PATCH 08/26] Git rid of cruft and fix a test --- app/dashboard.tsx | 9 ++++----- app/page.tsx | 14 ++------------ 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/app/dashboard.tsx b/app/dashboard.tsx index f7aee60a..a278ada5 100644 --- a/app/dashboard.tsx +++ b/app/dashboard.tsx @@ -231,8 +231,7 @@ async function fetchData() { }; } -export async function Dashboard({ platform = "desktop" }): Promise { - platform = platform || "desktop"; // Ensure platform is always defined +export async function Dashboard({ platform = "desktop" }: { platform?: string }): Promise { const { localData, @@ -254,7 +253,7 @@ export async function Dashboard({ platform = "desktop" }): Promise data-testid="firefox" className="scroll-m-20 text-xl font-semibold text-center pt-6 flex items-center justify-center gap-x-1" > - Desktop Messages Released on Firefox + {platform} Messages Released on Firefox
- Current Desktop Message Rollouts + Current {platform} Message Rollouts