1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-21 13:47:39 +02:00

chore: rename insights -> analytics (#10095)

Update the title of the insights / analytics page when the menu item
changes

While the side menu item has already changed, this change also updates
the page header and title.

Also fixes an error with a prop that shouldn't have been forwarded.
This commit is contained in:
Thomas Heartman 2025-06-10 08:11:35 +02:00 committed by GitHub
parent 444d3ef705
commit f0c19af5a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -49,6 +49,7 @@ const StyledActionsSmallScreen = styled('div')(({ theme }) => ({
export const InsightsHeader: VFC<DashboardHeaderProps> = ({ actions }) => {
const showInactiveUsers = useUiFlag('showInactiveUsers');
const pageName = useUiFlag('sideMenuCleanup') ? 'Analytics' : 'Insights';
const theme = useTheme();
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
@ -69,7 +70,7 @@ export const InsightsHeader: VFC<DashboardHeaderProps> = ({ actions }) => {
return (
<>
<PageHeader
title='Insights'
title={pageName}
titleElement={
<Typography
variant='h1'
@ -80,7 +81,7 @@ export const InsightsHeader: VFC<DashboardHeaderProps> = ({ actions }) => {
gap: theme.spacing(1),
})}
>
Insights
{pageName}
</Typography>
}
actions={

View File

@ -26,7 +26,9 @@ const listItemButtonStyle = (theme: Theme) => ({
},
});
const CappedText = styled(Typography)<{
const CappedText = styled(Typography, {
shouldForwardProp: (prop) => prop !== 'bold',
})<{
bold?: boolean;
}>(({ theme, bold }) => ({
whiteSpace: 'nowrap',