From d5b4da63dfe55f6b2374faf7429e07d7e3b0b7a5 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Sat, 17 Feb 2024 15:12:14 -0800 Subject: [PATCH] Updated page titles. --- src/app/(main)/console/TestConsole.tsx | 4 ---- src/app/(main)/console/[[...websiteId]]/page.tsx | 2 +- src/app/(main)/dashboard/page.tsx | 2 +- src/app/(main)/layout.tsx | 8 ++++++++ src/app/(main)/profile/page.tsx | 2 +- src/app/(main)/reports/ReportsPage.tsx | 2 +- src/app/(main)/reports/[reportId]/page.tsx | 2 +- src/app/(main)/reports/create/page.tsx | 2 +- src/app/(main)/reports/event-data/page.tsx | 2 +- src/app/(main)/reports/funnel/page.tsx | 2 +- src/app/(main)/reports/insights/page.tsx | 2 +- src/app/(main)/reports/page.tsx | 2 +- src/app/(main)/reports/retention/page.tsx | 2 +- src/app/(main)/settings/layout.tsx | 8 ++++++++ src/app/(main)/settings/teams/[teamId]/members/page.tsx | 2 +- src/app/(main)/settings/teams/[teamId]/team/page.tsx | 2 +- src/app/(main)/settings/teams/[teamId]/websites/page.tsx | 2 +- src/app/(main)/settings/teams/page.tsx | 2 +- src/app/(main)/settings/users/[userId]/page.tsx | 2 +- src/app/(main)/settings/users/page.tsx | 2 +- src/app/(main)/settings/websites/[websiteId]/page.tsx | 2 +- src/app/(main)/settings/websites/page.tsx | 2 +- src/app/(main)/teams/[teamId]/layout.tsx | 5 +++++ src/app/(main)/teams/[teamId]/reports/page.tsx | 5 +++++ src/app/(main)/teams/[teamId]/settings/layout.tsx | 5 +++++ src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx | 1 + src/app/(main)/websites/[websiteId]/event-data/page.tsx | 2 +- src/app/(main)/websites/[websiteId]/page.tsx | 6 +++++- src/app/(main)/websites/[websiteId]/realtime/page.tsx | 5 +++++ src/app/(main)/websites/[websiteId]/reports/page.tsx | 5 +++++ src/app/(main)/websites/page.tsx | 2 +- src/app/layout.tsx | 5 ++++- src/app/login/page.tsx | 2 +- src/app/logout/page.tsx | 2 +- src/app/share/[...shareId]/page.tsx | 5 ----- 35 files changed, 74 insertions(+), 34 deletions(-) diff --git a/src/app/(main)/console/TestConsole.tsx b/src/app/(main)/console/TestConsole.tsx index 9d8ecb24c..86a4792e3 100644 --- a/src/app/(main)/console/TestConsole.tsx +++ b/src/app/(main)/console/TestConsole.tsx @@ -1,5 +1,4 @@ import { Button } from 'react-basics'; -import Head from 'next/head'; import Link from 'next/link'; import Script from 'next/script'; import WebsiteSelect from 'components/input/WebsiteSelect'; @@ -73,9 +72,6 @@ export function TestConsole({ websiteId }: { websiteId: string }) { return ( - - {website ? `${website.name} | Umami Console` : 'Umami Console'} - diff --git a/src/app/(main)/console/[[...websiteId]]/page.tsx b/src/app/(main)/console/[[...websiteId]]/page.tsx index e9a6f722d..2cbdddcc0 100644 --- a/src/app/(main)/console/[[...websiteId]]/page.tsx +++ b/src/app/(main)/console/[[...websiteId]]/page.tsx @@ -16,5 +16,5 @@ export default async function ({ params: { websiteId } }) { } export const metadata: Metadata = { - title: 'Test Console | Umami', + title: 'Test Console', }; diff --git a/src/app/(main)/dashboard/page.tsx b/src/app/(main)/dashboard/page.tsx index 634a26169..7a6051100 100644 --- a/src/app/(main)/dashboard/page.tsx +++ b/src/app/(main)/dashboard/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Dashboard | Umami', + title: 'Dashboard', }; diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index f5aeab67d..0ecce22cd 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -1,3 +1,4 @@ +import { Metadata } from 'next'; import App from './App'; import NavBar from './NavBar'; import Page from 'components/layout/Page'; @@ -17,3 +18,10 @@ export default function ({ children }) { ); } + +export const metadata: Metadata = { + title: { + template: '%s | Umami', + default: 'Umami', + }, +}; diff --git a/src/app/(main)/profile/page.tsx b/src/app/(main)/profile/page.tsx index c653624bf..0c1f0082e 100644 --- a/src/app/(main)/profile/page.tsx +++ b/src/app/(main)/profile/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Profile | Umami', + title: 'Profile', }; diff --git a/src/app/(main)/reports/ReportsPage.tsx b/src/app/(main)/reports/ReportsPage.tsx index 498bce57f..6a63c2cb0 100644 --- a/src/app/(main)/reports/ReportsPage.tsx +++ b/src/app/(main)/reports/ReportsPage.tsx @@ -11,5 +11,5 @@ export default function ReportsPage({ teamId }: { teamId: string }) { ); } export const metadata = { - title: 'Reports | Umami', + title: 'Reports', }; diff --git a/src/app/(main)/reports/[reportId]/page.tsx b/src/app/(main)/reports/[reportId]/page.tsx index 12bf553aa..690daf478 100644 --- a/src/app/(main)/reports/[reportId]/page.tsx +++ b/src/app/(main)/reports/[reportId]/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { reportId } }) { } export const metadata: Metadata = { - title: 'Reports | Umami', + title: 'Reports', }; diff --git a/src/app/(main)/reports/create/page.tsx b/src/app/(main)/reports/create/page.tsx index 4a5928453..c2b1c18c5 100644 --- a/src/app/(main)/reports/create/page.tsx +++ b/src/app/(main)/reports/create/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Create Report | Umami', + title: 'Create Report', }; diff --git a/src/app/(main)/reports/event-data/page.tsx b/src/app/(main)/reports/event-data/page.tsx index 1f2936e61..2d6477e1a 100644 --- a/src/app/(main)/reports/event-data/page.tsx +++ b/src/app/(main)/reports/event-data/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Event Data Report | Umami', + title: 'Event Data Report', }; diff --git a/src/app/(main)/reports/funnel/page.tsx b/src/app/(main)/reports/funnel/page.tsx index e00cfd51b..40270bba9 100644 --- a/src/app/(main)/reports/funnel/page.tsx +++ b/src/app/(main)/reports/funnel/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Funnel Report | Umami', + title: 'Funnel Report', }; diff --git a/src/app/(main)/reports/insights/page.tsx b/src/app/(main)/reports/insights/page.tsx index cb3b90162..1e9e0ea6d 100644 --- a/src/app/(main)/reports/insights/page.tsx +++ b/src/app/(main)/reports/insights/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Insights Report | Umami', + title: 'Insights Report', }; diff --git a/src/app/(main)/reports/page.tsx b/src/app/(main)/reports/page.tsx index 44a034a06..4b495aca8 100644 --- a/src/app/(main)/reports/page.tsx +++ b/src/app/(main)/reports/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { teamId } }: { params: { teamId: string } }) } export const metadata: Metadata = { - title: 'Reports | Umami', + title: 'Reports', }; diff --git a/src/app/(main)/reports/retention/page.tsx b/src/app/(main)/reports/retention/page.tsx index 810714031..0f04fe981 100644 --- a/src/app/(main)/reports/retention/page.tsx +++ b/src/app/(main)/reports/retention/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Create Report | Umami', + title: 'Retention Report', }; diff --git a/src/app/(main)/settings/layout.tsx b/src/app/(main)/settings/layout.tsx index 487a9d596..573897d5e 100644 --- a/src/app/(main)/settings/layout.tsx +++ b/src/app/(main)/settings/layout.tsx @@ -1,4 +1,5 @@ import SettingsLayout from './SettingsLayout'; +import { Metadata } from 'next'; export default function ({ children }) { if (process.env.cloudMode) { @@ -7,3 +8,10 @@ export default function ({ children }) { return {children}; } + +export const metadata: Metadata = { + title: { + template: '%s | Settings | Umami', + default: 'Settings | Umami', + }, +}; diff --git a/src/app/(main)/settings/teams/[teamId]/members/page.tsx b/src/app/(main)/settings/teams/[teamId]/members/page.tsx index e36e92148..fbee6a8ea 100644 --- a/src/app/(main)/settings/teams/[teamId]/members/page.tsx +++ b/src/app/(main)/settings/teams/[teamId]/members/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { teamId } }) { } export const metadata: Metadata = { - title: 'Team members - Umami', + title: 'Team Members', }; diff --git a/src/app/(main)/settings/teams/[teamId]/team/page.tsx b/src/app/(main)/settings/teams/[teamId]/team/page.tsx index de2c96576..0c4dd2012 100644 --- a/src/app/(main)/settings/teams/[teamId]/team/page.tsx +++ b/src/app/(main)/settings/teams/[teamId]/team/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { teamId } }) { } export const metadata: Metadata = { - title: 'Teams Settings - Umami', + title: 'Teams Details', }; diff --git a/src/app/(main)/settings/teams/[teamId]/websites/page.tsx b/src/app/(main)/settings/teams/[teamId]/websites/page.tsx index ac4eb94f6..cfb465fb4 100644 --- a/src/app/(main)/settings/teams/[teamId]/websites/page.tsx +++ b/src/app/(main)/settings/teams/[teamId]/websites/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { teamId } }) { } export const metadata: Metadata = { - title: 'Teams Websites - Umami', + title: 'Teams Websites', }; diff --git a/src/app/(main)/settings/teams/page.tsx b/src/app/(main)/settings/teams/page.tsx index e45d6f2d3..93be83a20 100644 --- a/src/app/(main)/settings/teams/page.tsx +++ b/src/app/(main)/settings/teams/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Teams Settings - Umami', + title: 'Teams', }; diff --git a/src/app/(main)/settings/users/[userId]/page.tsx b/src/app/(main)/settings/users/[userId]/page.tsx index 414ad4831..d5dc5005d 100644 --- a/src/app/(main)/settings/users/[userId]/page.tsx +++ b/src/app/(main)/settings/users/[userId]/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { userId } }) { } export const metadata: Metadata = { - title: 'User Settings - Umami', + title: 'User Settings', }; diff --git a/src/app/(main)/settings/users/page.tsx b/src/app/(main)/settings/users/page.tsx index fa63cf188..a3209ab3c 100644 --- a/src/app/(main)/settings/users/page.tsx +++ b/src/app/(main)/settings/users/page.tsx @@ -5,5 +5,5 @@ export default function () { return ; } export const metadata: Metadata = { - title: 'Users | Umami', + title: 'Users', }; diff --git a/src/app/(main)/settings/websites/[websiteId]/page.tsx b/src/app/(main)/settings/websites/[websiteId]/page.tsx index b8eb85303..33caff5ac 100644 --- a/src/app/(main)/settings/websites/[websiteId]/page.tsx +++ b/src/app/(main)/settings/websites/[websiteId]/page.tsx @@ -6,5 +6,5 @@ export default async function ({ params: { websiteId } }) { } export const metadata: Metadata = { - title: 'Website settings - Umami', + title: 'Website', }; diff --git a/src/app/(main)/settings/websites/page.tsx b/src/app/(main)/settings/websites/page.tsx index 50a2df87b..8d305e6b7 100644 --- a/src/app/(main)/settings/websites/page.tsx +++ b/src/app/(main)/settings/websites/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { teamId } }: { params: { teamId: string } }) } export const metadata: Metadata = { - title: 'Websites Settings | Umami', + title: 'Websites', }; diff --git a/src/app/(main)/teams/[teamId]/layout.tsx b/src/app/(main)/teams/[teamId]/layout.tsx index f18d802af..c804c7463 100644 --- a/src/app/(main)/teams/[teamId]/layout.tsx +++ b/src/app/(main)/teams/[teamId]/layout.tsx @@ -1,5 +1,10 @@ import TeamProvider from './TeamProvider'; +import { Metadata } from 'next'; export default function ({ children, params: { teamId } }) { return {children}; } + +export const metadata: Metadata = { + title: 'Teams', +}; diff --git a/src/app/(main)/teams/[teamId]/reports/page.tsx b/src/app/(main)/teams/[teamId]/reports/page.tsx index 6eedabb47..5404e128a 100644 --- a/src/app/(main)/teams/[teamId]/reports/page.tsx +++ b/src/app/(main)/teams/[teamId]/reports/page.tsx @@ -1,3 +1,8 @@ import Page from 'app/(main)/reports/page'; +import { Metadata } from 'next'; export default Page; + +export const metadata: Metadata = { + title: 'Team Reports', +}; diff --git a/src/app/(main)/teams/[teamId]/settings/layout.tsx b/src/app/(main)/teams/[teamId]/settings/layout.tsx index c86d01962..b32d39e85 100644 --- a/src/app/(main)/teams/[teamId]/settings/layout.tsx +++ b/src/app/(main)/teams/[teamId]/settings/layout.tsx @@ -1,5 +1,10 @@ import TeamSettingsLayout from './TeamSettingsLayout'; +import { Metadata } from 'next'; export default function ({ children, params: { teamId } }) { return {children}; } + +export const metadata: Metadata = { + title: 'Team Settings', +}; diff --git a/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx b/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx index e4203177f..d917c6d71 100644 --- a/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx +++ b/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx @@ -1,3 +1,4 @@ +'use client'; import { Loading } from 'react-basics'; import { usePathname } from 'next/navigation'; import Page from 'components/layout/Page'; diff --git a/src/app/(main)/websites/[websiteId]/event-data/page.tsx b/src/app/(main)/websites/[websiteId]/event-data/page.tsx index 5ae0799a8..24cf4feaa 100644 --- a/src/app/(main)/websites/[websiteId]/event-data/page.tsx +++ b/src/app/(main)/websites/[websiteId]/event-data/page.tsx @@ -6,5 +6,5 @@ export default async function ({ params: { websiteId } }) { } export const metadata: Metadata = { - title: 'Event Data | Umami', + title: 'Event Data', }; diff --git a/src/app/(main)/websites/[websiteId]/page.tsx b/src/app/(main)/websites/[websiteId]/page.tsx index d7e6fcd0e..ddb6c833b 100644 --- a/src/app/(main)/websites/[websiteId]/page.tsx +++ b/src/app/(main)/websites/[websiteId]/page.tsx @@ -1,6 +1,10 @@ -'use client'; import WebsiteDetails from './WebsiteDetails'; +import { Metadata } from 'next'; export default function WebsitePage({ params: { websiteId } }) { return ; } + +export const metadata: Metadata = { + title: 'Websites', +}; diff --git a/src/app/(main)/websites/[websiteId]/realtime/page.tsx b/src/app/(main)/websites/[websiteId]/realtime/page.tsx index 1ce90b13c..0ca7ffd83 100644 --- a/src/app/(main)/websites/[websiteId]/realtime/page.tsx +++ b/src/app/(main)/websites/[websiteId]/realtime/page.tsx @@ -1,5 +1,10 @@ import WebsiteRealtimePage from './WebsiteRealtimePage'; +import { Metadata } from 'next'; export default function ({ params: { websiteId } }) { return ; } + +export const metadata: Metadata = { + title: 'Real-time', +}; diff --git a/src/app/(main)/websites/[websiteId]/reports/page.tsx b/src/app/(main)/websites/[websiteId]/reports/page.tsx index 7726a2cd6..caa805a63 100644 --- a/src/app/(main)/websites/[websiteId]/reports/page.tsx +++ b/src/app/(main)/websites/[websiteId]/reports/page.tsx @@ -1,5 +1,10 @@ import WebsiteReportsPage from './WebsiteReportsPage'; +import { Metadata } from 'next'; export default function ({ params: { websiteId } }) { return ; } + +export const metadata: Metadata = { + title: 'Website Reports', +}; diff --git a/src/app/(main)/websites/page.tsx b/src/app/(main)/websites/page.tsx index ee6e4336b..ee49cb8af 100644 --- a/src/app/(main)/websites/page.tsx +++ b/src/app/(main)/websites/page.tsx @@ -6,5 +6,5 @@ export default function ({ params: { teamId, userId } }) { } export const metadata: Metadata = { - title: 'Websites | Umami', + title: 'Websites', }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 970c33f0b..33ae9fa99 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -32,5 +32,8 @@ export default function ({ children }) { } export const metadata: Metadata = { - title: 'umami', + title: { + template: '%s | Umami', + default: 'Umami', + }, }; diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index ee4c0a70e..6f34d987e 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -6,5 +6,5 @@ export default async function () { } export const metadata: Metadata = { - title: 'Login | Umami', + title: 'Login', }; diff --git a/src/app/logout/page.tsx b/src/app/logout/page.tsx index b74f65847..a253049a9 100644 --- a/src/app/logout/page.tsx +++ b/src/app/logout/page.tsx @@ -6,5 +6,5 @@ export default function () { } export const metadata: Metadata = { - title: 'Logout | Umami', + title: 'Logout', }; diff --git a/src/app/share/[...shareId]/page.tsx b/src/app/share/[...shareId]/page.tsx index 02d244e99..e8ca8e607 100644 --- a/src/app/share/[...shareId]/page.tsx +++ b/src/app/share/[...shareId]/page.tsx @@ -1,10 +1,5 @@ import SharePage from './SharePage'; -import { Metadata } from 'next'; export default function ({ params: { shareId } }) { return ; } - -export const metadata: Metadata = { - title: 'umami', -};