Skip to content

Commit

Permalink
Ensure title is a single element
Browse files Browse the repository at this point in the history
Fixes "Warning: A title element received an array with more than 1
element as children."
  • Loading branch information
canac committed Nov 20, 2024
1 parent 48270e0 commit c360f55
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 61 deletions.
4 changes: 1 addition & 3 deletions pages/acceptInvite.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ const AcceptInvitePage = (): ReactElement => {
return (
<>
<Head>
<title>
{appName} | {t('Accept Invite')}
</title>
<title>{`${appName} | ${t('Accept Invite')}`}</title>
</Head>
<SetupPage title={t('Accepting Invite')}>
<p>{t('You will be redirected soon...')}</p>
Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const AccountListsPage = ({ data }: AccountListsPageProps): ReactElement => {
return (
<>
<Head>
<title>
{appName} | {t('Account Lists')}
</title>
<title>{`${appName} | ${t('Account Lists')}`}</title>
</Head>
<AccountLists data={data} />
</>
Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists/[accountListId].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ const AccountListIdPage = ({
return (
<>
<Head>
<title>
{appName} | {data.accountList.name}
</title>
<title>{`${appName} | ${data.accountList.name}`}</title>
</Head>
<Dashboard data={data} accountListId={data.accountList.id} />

Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists/[accountListId]/coaching.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const CoachingPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Coaching Accounts')}
</title>
<title>{`${appName} | ${t('Coaching Accounts')}`}</title>
</Head>
{accountListId ? (
<CoachingList accountListId={accountListId} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ const CoachingPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Coaching Accounts')}
</title>
<title>{`${appName} | ${t('Coaching Accounts')}`}</title>
</Head>
{accountListId && coachingId && isReady ? (
<CoachingDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ const ContactFlowSetupPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Contact Flows')} | {t('Setup')}
</title>
<title>{`${appName} | ${t('Contact Flows')} | ${t('Setup')}`}</title>
</Head>
{accountListId ? (
<DndProvider backend={HTML5Backend}>
Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists/[accountListId]/reports/coaching.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ const CoachingReportPage = (): ReactElement => {
return (
<>
<Head>
<title>
{appName} | {t('Reports')} | {t('Coaching')}
</title>
<title>{`${appName} | ${t('Reports')} | ${t('Coaching')}`}</title>
</Head>
{accountListId ? (
<CoachingDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const DesignationAccountsReportPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Reports - Designation Accounts')}
</title>
<title>{`${appName} | ${t('Reports - Designation Accounts')}`}</title>
</Head>
{accountListId ? (
<DesignationAccountsReportPageWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ const DonationsReportPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Reports')} | {t('Donations')}
</title>
<title>{`${appName} | ${t('Reports')} | ${t('Donations')}`}</title>
</Head>
{accountListId ? (
<DonationsReportPageWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const ExpectedMonthlyTotalReportPage = (): ReactElement => {
<>
<Head>
<title>
{appName} | {t('Reports')} | {t('Expect Monthly Total')}
{`${appName} | ${t('Reports')} | ${t('Expect Monthly Total')}`}
</title>
</Head>
{accountListId ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const FinancialAccountSummaryPage: React.FC = () => {
<>
<Head>
<title>
{appName} | {t('Summary Report - Responsibility Centers')}
{`${appName} | ${t('Summary Report - Responsibility Centers')}`}
</title>
</Head>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const FinancialAccountEntries = (): ReactElement => {
<>
<Head>
<title>
{appName} | {t('Transactions Report - Responsibility Centers')}
{`${appName} | ${t('Transactions Report - Responsibility Centers')}`}
</title>
</Head>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ const FinancialAccountsPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Reports - Responsibility Centers')}
</title>
<title>{`${appName} | ${t('Reports - Responsibility Centers')}`}</title>
</Head>

{accountListId ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const PartnerCurrencyReportPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Reports - Partner')}
</title>
<title>{`${appName} | ${t('Reports - Partner')}`}</title>
</Head>
{accountListId ? (
<PartnerCurrencyReportPageWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const PartnerGivingAnalysisReportPage: React.FC = () => {
<>
<Head>
<title>
{appName} | {t('Reports')} | {t('Partner Giving Analysis')}
{`${appName} | ${t('Reports')} | ${t('Partner Giving Analysis')}`}
</title>
</Head>
{accountListId ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const SalaryCurrencyReportPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Reports - Salary')}
</title>
<title>{`${appName} | ${t('Reports - Salary')}`}</title>
</Head>
{accountListId ? (
<SalaryCurrencyReportPageWrapper>
Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists/[accountListId]/settings/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export const SettingsWrapper: React.FC<SettingsWrapperProps> = ({
return (
<>
<Head>
<title>
{appName} | {pageTitle}
</title>
<title>{`${appName} | ${pageTitle}`}</title>
</Head>
<Box component="main">
<SidePanelsLayout
Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists/[accountListId]/setup/finish.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ const FinishPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Setup - Finish')}
</title>
<title>{`${appName} | ${t('Setup - Finish')}`}</title>
</Head>
<SetupPage
title={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ const TasksPage: React.FC = () => {
return (
<>
<Head>
<title>
{appName} | {t('Tasks')}
</title>
<title>{`${appName} | ${t('Tasks')}`}</title>
</Head>
{accountListId ? (
<WhiteBackground>
Expand Down
4 changes: 1 addition & 3 deletions pages/accountLists/[accountListId]/tools/ToolsWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ export const ToolsWrapper: React.FC<ToolsWrapperProps> = ({
return (
<>
<Head>
<title>
{appName} | {pageTitle}
</title>
<title>{`${appName} | ${pageTitle}`}</title>
</Head>
<Box component="main">
{accountListId ? (
Expand Down
4 changes: 1 addition & 3 deletions pages/setup/account.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ const AccountPage: React.FC<PageProps> = ({ accountListOptions }) => {
return (
<>
<Head>
<title>
{appName} | {t('Setup - Default Account')}
</title>
<title>{`${appName} | ${t('Setup - Default Account')}`}</title>
</Head>
<SetupPage title={t('Set default account')}>
{t(
Expand Down
4 changes: 1 addition & 3 deletions pages/setup/connect.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const ConnectPage = (): ReactElement => {
return (
<>
<Head>
<title>
{appName} | {t('Setup - Get Connected')}
</title>
<title>{`${appName} | ${t('Setup - Get Connected')}`}</title>
</Head>
<Connect />
</>
Expand Down
4 changes: 1 addition & 3 deletions pages/setup/start.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const StartPage = (): ReactElement => {
return (
<>
<Head>
<title>
{appName} | {t('Setup - Start')}
</title>
<title>{`${appName} | ${t('Setup - Start')}`}</title>
</Head>
<SetupPage title={t("It's time to get started")}>
<p>
Expand Down

0 comments on commit c360f55

Please sign in to comment.