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:
parent
444d3ef705
commit
f0c19af5a9
@ -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={
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user