Skip to content

Commit

Permalink
frontend: code cleaning
Browse files Browse the repository at this point in the history
remove log residue & simplify visuallyHidden
  • Loading branch information
ErvinRacz committed Jan 3, 2025
1 parent e503648 commit c90e91c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 0 additions & 2 deletions frontend/src/components/Activity/ActivityContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ function Container() {
return entries;
}

console.log(classes);

return (
<>
<ListHeader title={t('activity|Activity')} />
Expand Down
21 changes: 2 additions & 19 deletions frontend/src/components/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Container from '@mui/material/Container';
import CssBaseline from '@mui/material/CssBaseline';
import Link from '@mui/material/Link';
import makeStyles from '@mui/styles/makeStyles';
import { visuallyHidden } from '@mui/utils';
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import API from '../api/API';
Expand All @@ -19,26 +19,9 @@ import InstanceListLayout from './layouts/InstanceListLayout';
import MainLayout from './layouts/MainLayout';
import PageNotFoundLayout from './layouts/PageNotFoundLayout';

const useStyle = makeStyles(() => ({
// importing visuallyHidden has typing issues at time of writing.
// import { visuallyHidden } from '@mui/utils';
visuallyHidden: {
border: 0,
clip: 'rect(0 0 0 0)',
height: '1px',
margin: -1,
overflow: 'hidden',
padding: 0,
position: 'absolute',
whiteSpace: 'nowrap',
width: '1px',
},
}));

function SkipLink() {
const classes = useStyle();
return (
<Link href="#main" className={classes.visuallyHidden} underline="hover">
<Link href="#main" sx={visuallyHidden} underline="hover">
Skip to main content
</Link>
);
Expand Down

0 comments on commit c90e91c

Please sign in to comment.