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

fix: Clean up no-results page #420

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

o-jorgensen
Copy link
Contributor

This PR will add some changes to the "No results" page:

  • Change variogram/object links from <a href> to <Link to> to avoid page refresh.
  • Remove the <InfoPageComponent> wrapper to simplify styling
  • Decrease Halloween factor (remove cobweb box image)

Closes #419

@o-jorgensen o-jorgensen self-assigned this Dec 27, 2024
Comment on lines +7 to +16
<Styled.NoResults>
<Typography variant="h2">No results found</Typography>
<Typography variant="body_long">
Please check your compute settings for
<Link to={'../compute/variogram'}>variogram</Link>
or
<Link to={'../compute/object'}>object</Link>
cases.
</Typography>
</Styled.NoResults>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Styled.NoResults>
<Typography variant="h2">No results found</Typography>
<Typography variant="body_long">
Please check your compute settings for
<Link to={'../compute/variogram'}>variogram</Link>
or
<Link to={'../compute/object'}>object</Link>
cases.
</Typography>
</Styled.NoResults>
<Styled.NoResults>
<Typography variant="h2">No results found</Typography>
<Typography variant="body_long">
Please check your compute settings for
{location.pathname.includes('variogram') && (
<Link to={'../compute/variogram'}>variogram</Link>
)}
{location.pathname.includes('object') && (
<Link to={'../compute/object'}>object</Link>
)}
case.
</Typography>
</Styled.NoResults>

import * as Styled from './NoResults.styled';
import { Link } from 'react-router-dom';

export const NoResults = () => {
return (
Copy link
Collaborator

@mheggelund mheggelund Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return (
return (
const location = useLocation();

import * as Styled from './NoResults.styled';
import { Link } from 'react-router-dom';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { Link } from 'react-router-dom';
import { Link, useLocation } from 'react-router-dom';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up no-results page
2 participants