Skip to content

Commit

Permalink
Fix Link routing (#428)
Browse files Browse the repository at this point in the history
* Add fia to reference URL

* Revert back to react Link for smoother transitions
  • Loading branch information
Dagonite authored Jan 21, 2025
1 parent 34a83b5 commit 7de6af3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Jobs/JobsAll.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// React components
import React, { useState } from 'react';
import { useHistory, useParams } from 'react-router-dom';
import { useHistory, useParams, Link } from 'react-router-dom';

// Material UI components
import { useTheme } from '@mui/material/styles';
import { TableCell, Link } from '@mui/material';
import { TableCell } from '@mui/material';

// Local data
import JobsBase, { useFetchJobs, useFetchTotalCount, Job, headerStyles } from './JobsBase';
Expand Down Expand Up @@ -55,14 +55,13 @@ const JobsAll: React.FC = () => {
<TableCell sx={{ width: '10%' }}>
{job.run?.instrument_name ? (
<Link
href={`/reduction-history/${job.run.instrument_name}`}
sx={{
to={`/reduction-history/${job.run.instrument_name}`}
style={{
color: theme.palette.mode === 'dark' ? '#86b4ff' : theme.palette.primary.main,
textDecoration: 'none',
'&:hover': {
textDecoration: 'underline',
},
}}
onMouseEnter={(e) => (e.currentTarget.style.textDecoration = 'underline')}
onMouseLeave={(e) => (e.currentTarget.style.textDecoration = 'none')}
>
{job.run.instrument_name}
</Link>
Expand Down

0 comments on commit 7de6af3

Please sign in to comment.