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

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
Binary file removed src/features/Results/NoResults/NoResults.jpeg
Binary file not shown.
16 changes: 9 additions & 7 deletions src/features/Results/NoResults/NoResults.styled.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import styled from 'styled-components';
import { spacings } from '../../../tokens/spacings';
import { theme } from '../../../tokens/theme';

const StyledImg = styled.img`
scale: 85%;
`;
export const TextDiv = styled.div`
export const NoResults = styled.div`
display: flex;
flex-direction: column;
align-items: center;

row-gap: ${spacings.MEDIUM};
padding: ${spacings.X_LARGE};

a {
color: ${theme.light.primary.resting};
display: inline-block;
margin-inline: 0.2em;
}
`;
export { StyledImg as Img };
38 changes: 16 additions & 22 deletions src/features/Results/NoResults/NoResults.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
import { Typography } from '@equinor/eds-core-react';
import { InfoPageComponent } from '../../../components/InfoPageComponent/InfoPageComponent';
import NoResultPicture from './NoResults.jpeg';
import * as Styled from './NoResults.styled';
import { Link, useLocation } from 'react-router-dom';

export const NoResults = () => {
const location = useLocation();

return (
o-jorgensen marked this conversation as resolved.
Show resolved Hide resolved
<InfoPageComponent scaleHight="true">
<Styled.Img src={NoResultPicture} alt="altText" />
<Styled.TextDiv>
<Typography variant="h4">
Oh no! It seems we don’t have any results for this model yet
</Typography>
<Typography variant="body_long">
To get started, try adding cases to the <span>&nbsp;</span>
<Typography link href={'../compute/variogram'}>
variogram
</Typography>
<span>&nbsp;</span>
or <span>&nbsp;</span>
<Typography link href={'../compute/object'}>
object
</Typography>
<span>&nbsp;</span> page.
</Typography>
</Styled.TextDiv>
</InfoPageComponent>
<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>
);
};
Loading