🧩 Background
PROFILE_URL in components/dashboard/ShareSheet.tsx is a function that builds the dashboard URL. This URL format is likely needed in other places (og route, landing page, etc.) and should be centralized.
🎯 Objective
Move PROFILE_URL to utils/urls.ts and import from there.
📁 Files to touch
utils/urls.ts (new)
components/dashboard/ShareSheet.tsx
🛠️ Implementation steps
- Create
getDashboardUrl(username: string): string using window.location.origin with an SSR fallback.
- Import and use in
ShareSheet.
- Add a unit test.
✅ Definition of done
🧩 Background
PROFILE_URLincomponents/dashboard/ShareSheet.tsxis a function that builds the dashboard URL. This URL format is likely needed in other places (og route, landing page, etc.) and should be centralized.🎯 Objective
Move
PROFILE_URLtoutils/urls.tsand import from there.📁 Files to touch
utils/urls.ts(new)components/dashboard/ShareSheet.tsx🛠️ Implementation steps
getDashboardUrl(username: string): stringusingwindow.location.originwith an SSR fallback.ShareSheet.✅ Definition of done