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 9d8ecb24..86a4792e 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 e9a6f722..2cbdddcc 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 634a2616..7a605110 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 f5aeab67..0ecce22c 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 c653624b..0c1f0082 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 498bce57..6a63c2cb 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 12bf553a..690daf47 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 4a592845..c2b1c18c 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 1f2936e6..2d6477e1 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 e00cfd51..40270bba 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 cb3b9016..1e9e0ea6 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 44a034a0..4b495aca 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 81071403..0f04fe98 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 487a9d59..573897d5 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 e36e9214..fbee6a8e 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 de2c9657..0c4dd201 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 ac4eb94f..cfb465fb 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 e45d6f2d..93be83a2 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 414ad483..d5dc5005 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 fa63cf18..a3209ab3 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 b8eb8530..33caff5a 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 50a2df87..8d305e6b 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 f18d802a..c804c746 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 6eedabb4..5404e128 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 c86d0196..b32d39e8 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 e4203177..d917c6d7 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 5ae0799a..24cf4fea 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 d7e6fcd0..ddb6c833 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 1ce90b13..0ca7ffd8 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 7726a2cd..caa805a6 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 ee6e4336..ee49cb8a 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 970c33f0..33ae9fa9 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 ee4c0a70..6f34d987 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 b74f6584..a253049a 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 02d244e9..e8ca8e60 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', -};