Improve customer orders: own list, payment/order status, and transaction details.
Also widen order item modals, link FA product names, and polish related dashboard UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
55071af98c
commit
06589600bd
@@ -11,6 +11,8 @@ interface UseDashboardDocumentTitleOptions {
|
||||
pathname: string
|
||||
routeRules: RouteTitleRule[]
|
||||
pageLabels?: string[]
|
||||
/** When set, used as `document.title` instead of the default dashboard pattern. */
|
||||
overrideTitle?: string
|
||||
}
|
||||
|
||||
export function useDashboardDocumentTitle({
|
||||
@@ -19,13 +21,18 @@ export function useDashboardDocumentTitle({
|
||||
pathname,
|
||||
routeRules,
|
||||
pageLabels,
|
||||
overrideTitle,
|
||||
}: UseDashboardDocumentTitleOptions) {
|
||||
useEffect(() => {
|
||||
if (overrideTitle?.trim()) {
|
||||
document.title = overrideTitle.trim()
|
||||
return
|
||||
}
|
||||
const resolvedLabels = pageLabels ?? resolveRoutePageLabels(pathname, routeRules)
|
||||
document.title = formatDashboardDocumentTitle({
|
||||
businessName,
|
||||
dashboardName,
|
||||
pageLabels: resolvedLabels,
|
||||
})
|
||||
}, [businessName, dashboardName, pathname, routeRules, pageLabels])
|
||||
}, [businessName, dashboardName, pathname, routeRules, pageLabels, overrideTitle])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user