Skip to content

Commit

Permalink
fix: change quick order page title
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJiang2021 committed Mar 20, 2023
1 parent e1f9cbc commit 45a777f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/storefront/src/components/layout/B3Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function B3Layout({
useEffect(() => {
const itemsRoutes = routes.filter((item: RouteItem) => item.path === location.pathname)
if (itemsRoutes.length && location.pathname !== '/quoteDraft') {
setTitle(itemsRoutes[0].name)
setTitle(itemsRoutes[0].pageTitle || itemsRoutes[0].name)
} else {
setTitle('')
}
Expand Down
2 changes: 2 additions & 0 deletions apps/storefront/src/shared/routes/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface RouteItem extends RouteItemBasic {
wsKey: string,
configKey?: string,
isTokenLogin: boolean,
pageTitle?: string,
}

export interface RouteFirstLevelItem extends RouteItemBasic{
Expand Down Expand Up @@ -194,6 +195,7 @@ const routes: RouteItem[] = [
{
path: '/purchased-products',
name: 'Quick Order',
pageTitle: 'Purchase products',
wsKey: 'quickorder',
isMenuItem: true,
component: Quickorder,
Expand Down

0 comments on commit 45a777f

Please sign in to comment.