Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usage of activeClassName in react-router-dom v6 ⬆️ #451

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ui/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function Sidebar(props) {
<NavLink
to={prop.layout + prop.path}
className={activePro + classes.item}
activeClassName='active'
activeclassname='active'
JamieSlome marked this conversation as resolved.
Show resolved Hide resolved
key={key}
style={{ textDecoration: 'none' }}
>
Expand Down
6 changes: 3 additions & 3 deletions src/ui/views/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ export default function UserProfile() {
return (
<form onSubmit={handleSubmit}>
<Snackbar
open={message}
open={true}
maoo marked this conversation as resolved.
Show resolved Hide resolved
message={message}
anchorOrigin={{ vertical: 'top', horizontal: 'right' }}
autoHideDuration={5000}
onClose={() => setMessage('')}
/>
<GridContainer justify='center' style={{ minHeight: '100vh' }} alignItems='center'>
<GridContainer justifyContent='center' style={{ minHeight: '100vh' }} alignItems='center'>
<GridItem xs={12} sm={10} md={6} lg={4} xl={3}>
<Card>
<CardHeader color='primary'>
Expand Down Expand Up @@ -147,7 +147,7 @@ export default function UserProfile() {
</CardFooter>
</Card>
<div style={{ textAlign: 'center', opacity: 0.9, fontSize: '12px' }}>
<Badge color='error' badgeContent={'NEW'} />{' '}
<Badge overlap='rectangular' color='error' badgeContent={'NEW'} />{' '}
<span style={{ paddingLeft: '20px' }}>
View our <a href='/admin/push'>open source activity feed</a> or{' '}
<a href='/admin/repo'>scroll through projects</a> we contribute to
Expand Down
6 changes: 4 additions & 2 deletions src/ui/views/User/User.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ export default function Dashboard(props) {
const navigate = useNavigate();

useEffect(() => {
const id = props.match.params.id;
if (id == null) {
let id = null;
if (!props.match) {
setIsProfile(true);
} else {
id = props.match.params.id;
JamieSlome marked this conversation as resolved.
Show resolved Hide resolved
}

if (id) {
Expand Down