Unify the dashboard experience and retire the multi-theme engine so onboarding and day-to-day invoicing feel consistent and easier to maintain.
Shared layout, tabs, and sidebar timer; user onboarding and registration polish; settings danger zone and data export; chart and tRPC perf fixes; migrations for onboarding and dropped appearance columns. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/** Public app origin (no trailing slash). */
|
||||
export function getAppUrl(): string {
|
||||
if (typeof window !== "undefined") {
|
||||
return window.location.origin.replace(/\/$/, "");
|
||||
}
|
||||
|
||||
const fromEnv = process.env.NEXT_PUBLIC_APP_URL?.trim();
|
||||
if (fromEnv) return fromEnv.replace(/\/$/, "");
|
||||
|
||||
return `http://localhost:${process.env.PORT ?? 3000}`;
|
||||
}
|
||||
|
||||
/** Hostname for display (e.g. marketing browser chrome). */
|
||||
export function getAppHost(): string {
|
||||
try {
|
||||
return new URL(getAppUrl()).host;
|
||||
} catch {
|
||||
return "beenvoice.app";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user