Skip to content

Commit a7ce54e

Browse files
committed
copilot pr comments
1 parent 0a645dc commit a7ce54e

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

src/app/components/Footer.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { FooterLink, FooterColumnTitle } from './FooterElements';
1111
const Footer: React.FC = () => {
1212
const theme = useTheme();
1313
const t = useTranslations('footer');
14-
const FooterColumnWidth = '185px';
14+
const FOOTER_COLUMN_WIDTH = '185px';
1515
const SlackSvg = (
1616
<svg
1717
xmlns='http://www.w3.org/2000/svg'
@@ -92,7 +92,7 @@ const Footer: React.FC = () => {
9292
component='a'
9393
href={MOBILITY_DATA_LINKS.github}
9494
target='_blank'
95-
rel='noreferrer'
95+
rel='noopener noreferrer'
9696
size='small'
9797
>
9898
<GitHub />
@@ -102,7 +102,7 @@ const Footer: React.FC = () => {
102102
component='a'
103103
href={MOBILITY_DATA_LINKS.slack}
104104
target='_blank'
105-
rel='noreferrer'
105+
rel='noopenernoreferrer'
106106
size='small'
107107
>
108108
{SlackSvg}
@@ -112,7 +112,7 @@ const Footer: React.FC = () => {
112112
component='a'
113113
href={MOBILITY_DATA_LINKS.linkedin}
114114
target='_blank'
115-
rel='noreferrer'
115+
rel='noopener noreferrer'
116116
size='small'
117117
>
118118
<LinkedIn />
@@ -130,7 +130,7 @@ const Footer: React.FC = () => {
130130
}}
131131
>
132132
{/* Platform column */}
133-
<Box sx={{ width: FooterColumnWidth }}>
133+
<Box sx={{ width: FOOTER_COLUMN_WIDTH }}>
134134
<FooterColumnTitle>{t('columns.platform')}</FooterColumnTitle>
135135
<FooterLink href='/feeds'>{t('links.feeds')}</FooterLink>
136136
<FooterLink href='/contribute'>{t('links.addFeed')}</FooterLink>
@@ -143,7 +143,7 @@ const Footer: React.FC = () => {
143143
</Box>
144144

145145
{/* Validators column */}
146-
<Box sx={{ width: FooterColumnWidth }}>
146+
<Box sx={{ width: FOOTER_COLUMN_WIDTH }}>
147147
<FooterColumnTitle>{t('columns.validators')}</FooterColumnTitle>
148148
<FooterLink
149149
href='https://gtfs-validator.mobilitydata.org/'
@@ -169,7 +169,7 @@ const Footer: React.FC = () => {
169169
</Box>
170170

171171
{/* Company column */}
172-
<Box sx={{ width: FooterColumnWidth }}>
172+
<Box sx={{ width: FOOTER_COLUMN_WIDTH }}>
173173
<FooterColumnTitle>{t('columns.company')}</FooterColumnTitle>
174174
<FooterLink href='/about'>{t('links.about')}</FooterLink>
175175
<FooterLink href='/faq'>{t('links.faq')}</FooterLink>
@@ -183,7 +183,7 @@ const Footer: React.FC = () => {
183183
</Box>
184184

185185
{/* Legal column */}
186-
<Box sx={{ width: FooterColumnWidth }}>
186+
<Box sx={{ width: FOOTER_COLUMN_WIDTH }}>
187187
<FooterColumnTitle>{t('columns.legal')}</FooterColumnTitle>
188188
<FooterLink href='/privacy-policy'>
189189
{t('links.privacyPolicy')}

src/app/components/FooterElements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const FooterLink: React.FC<FooterLinkProps> = ({
2121
component={NextLink}
2222
href={href}
2323
target={external === true ? '_blank' : undefined}
24-
rel={external === true ? 'noreferrer' : undefined}
24+
rel={external === true ? 'noopener noreferrer' : undefined}
2525
sx={{
2626
color: theme.palette.text.secondary,
2727
textDecoration: 'none',

src/app/components/Header.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ export default function DrawerAppBar(): React.ReactElement {
186186
}, 80);
187187
};
188188

189+
React.useEffect(() => {
190+
return () => {
191+
clearTimeout(validatorCloseTimer.current);
192+
clearTimeout(accountCloseTimer.current);
193+
};
194+
}, []);
195+
189196
const [isSearchOpen, setIsSearchOpen] = React.useState(false);
190197

191198
const metricsOptionsEnabled =
@@ -349,7 +356,7 @@ export default function DrawerAppBar(): React.ReactElement {
349356
<MenuItem
350357
onClick={() => {
351358
setValidatorAnchorEl(null);
352-
handleNavigation('gbfs-validator');
359+
handleNavigation('/gbfs-validator');
353360
}}
354361
>
355362
{tCommon('gbfsValidator')}

src/app/components/HeaderSearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default function HeaderSearchBar({
112112
width: searchOpen ? 280 : 0,
113113
opacity: searchOpen ? 1 : 0,
114114
overflow: 'hidden',
115-
transition: 'max-width 0.3s ease, opacity 0.25s ease',
115+
transition: 'width 0.3s ease, opacity 0.25s ease',
116116
'& input': { p: '2px 4px' },
117117
}}
118118
/>

0 commit comments

Comments
 (0)