Skip to content

Managing Banner

JK edited this page Oct 28, 2024 · 1 revision

Managing the Banner

These instructions are for updating and removing the annoucement banner that shows up at the top of the home page.

Changing the Banner

Submit a PR to make the following two changes.

  1. Change the announcement text in the bannerContent component in page-settings.tsx. E.g.
    const bannerContent: FunctionComponent = () =>
        <Box display='flex' alignItems='center' pt={1} pb={1}>
            <Box mr={2}>
                <InfoIcon fontSize='large' />
            </Box>
            <Typography variant='body1'>
                Announcement here with optional links.
            </Typography>
        </Box>;
  1. Update the cookie value to cause the new banner to be displayed for those who have dismissed the previous banner. E.g.
            banner: {
                content: bannerContent,
                props: {
                    dismissButton: {
                        show: true,
                        label: 'Got It'
                    },
                    color: 'info'
                },
                cookie: {
                    key: 'new value here',
                    value: 'closed',
                    path: '/'
                }
            },

Removing the Banner

To remove the banner entirely, submit a PR to remove (comment out) the bannerContent and banner components shown above.