Skip to content

Commit

Permalink
feat(search): add not pools found comp.
Browse files Browse the repository at this point in the history
  • Loading branch information
neuodev committed Sep 8, 2023
1 parent cab8160 commit 5f6a3ca
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 4 deletions.
228 changes: 228 additions & 0 deletions src/assets/staking-illustration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/DesktopTableRevamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { TooltipRevamp } from './common/Tooltip';
import StakingPoolCardRevamp from './StakingPoolCardRevamp';
import { PoolSizeTagRevamp } from './PoolSizeTag';
import Label from './common/Label';
import NoStakePoolsFound from './NoStakePoolsFound';

const TableContent = styled.div`
display: inline-flex;
Expand Down Expand Up @@ -124,7 +125,7 @@ function DesktopTableRevamp({
const isResolved = status === 'resolved';

if (isResolved && data != null && data.length <= 0) {
return <Message>No results found.</Message>;
return <NoStakePoolsFound />;
}

if (isLoading) {
Expand Down
3 changes: 2 additions & 1 deletion src/components/MobileTableRevamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { DelegationProps } from '../containers/Home';
import StakingPoolCardRevamp from './StakingPoolCardRevamp';
import { PoolSizeTagRevamp } from './PoolSizeTag';
import { ValueRevamp } from './DesktopTableRevamp';
import NoStakePoolsFound from './NoStakePoolsFound';

const CardMobile = styled.div`
display: flex;
Expand Down Expand Up @@ -75,7 +76,7 @@ function MobileTableRevamp({
const isResolved = status === 'resolved';

if (isResolved && data != null && data.length <= 0) {
return <Message>No results found.</Message>;
return <NoStakePoolsFound />;
}

if (isLoading) {
Expand Down
31 changes: 31 additions & 0 deletions src/components/NoStakePoolsFound.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// @flow
import React from 'react';
import styled from 'styled-components';
import stakingIllustration from '../assets/staking-illustration.svg';

const Container = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
min-height: 60vh;
& .title {
font-weight: 500;
font-size: 18px;
line-height: 26px;
text-align: center;
}
`;

function NoStakePoolsFound() {
return (
<Container>
<img className="staking-img" src={stakingIllustration} alt="Staking Pools" />
<h1 className="title">No stake pools found</h1>
</Container>
);
}

export default NoStakePoolsFound;
2 changes: 0 additions & 2 deletions src/components/common/Label.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// @flow
import React from 'react';
import type { Node } from 'react';
import sortingArrowDown from '../../assets/arrow-sorting-up.svg';
import sortingArrowDownDark from '../../assets/arrow-sorting-up-dark.svg';
import ArrowsIdle from '../../assets/arrows-idle.svg';
import ArrowsAscending from '../../assets/arrows-ascending.svg';
import ArrowsDescending from '../../assets/arrows-descending.svg';
Expand Down

0 comments on commit 5f6a3ca

Please sign in to comment.