Skip to content

Commit 4de1eb9

Browse files
committedFeb 8, 2019
feat: implement stuart's suggestions
1 parent 092d4e7 commit 4de1eb9

File tree

4 files changed

+32
-16
lines changed

4 files changed

+32
-16
lines changed
 

‎src/components/pnk-balance-card.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ReactComponent as SectionArrowBackground } from '../assets/images/secti
1010
import styled from 'styled-components/macro'
1111

1212
const StyledCard = styled(Card)`
13+
cursor: initial;
1314
margin: 28px 0;
1415
1516
.ant-card-body {

‎src/components/welcome-card.js

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import React, { useEffect, useState } from 'react'
12
import { Card } from 'antd'
23
import PropTypes from 'prop-types'
3-
import React from 'react'
44
import { fluidRange } from 'polished'
55
import styled from 'styled-components/macro'
66

7+
let cachedShow = true
78
const StyledCard = styled(Card)`
89
z-index: 1;
910
@@ -68,17 +69,31 @@ const StyledTextCardGrid = styled(StyledCardGrid)`
6869
padding: calc(10% + 20px) 0 10%;
6970
}
7071
`
71-
const WelcomeCard = ({ icon, text, version }) => (
72-
<StyledCard bordered={false}>
73-
<StyledIconCardGrid>
74-
{icon}
75-
<StyledDiv>{version}</StyledDiv>
76-
</StyledIconCardGrid>
77-
<StyledTextCardGrid className="secondary-linear-background theme-linear-background">
78-
{text}
79-
</StyledTextCardGrid>
80-
</StyledCard>
81-
)
72+
const WelcomeCard = ({ icon, text, version }) => {
73+
const [show, setShow] = useState(cachedShow)
74+
useEffect(() => {
75+
if (show) {
76+
const timeout = setTimeout(() => setShow(false), 5000)
77+
return () => {
78+
clearTimeout(timeout)
79+
cachedShow = false
80+
}
81+
}
82+
}, [])
83+
return (
84+
show && (
85+
<StyledCard bordered={false}>
86+
<StyledIconCardGrid>
87+
{icon}
88+
<StyledDiv>{version}</StyledDiv>
89+
</StyledIconCardGrid>
90+
<StyledTextCardGrid className="secondary-linear-background theme-linear-background">
91+
{text}
92+
</StyledTextCardGrid>
93+
</StyledCard>
94+
)
95+
)
96+
}
8297

8398
WelcomeCard.propTypes = {
8499
icon: PropTypes.node.isRequired,

‎src/containers/cases.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ export default () => {
7373
onChange={useCallback(e => setFilter(e.target.value), [])}
7474
value={filter}
7575
>
76-
<Radio.Button value>Active</Radio.Button>
77-
<Radio.Button value={false}>Executed</Radio.Button>
76+
<Radio.Button value>In Progress</Radio.Button>
77+
<Radio.Button value={false}>Closed</Radio.Button>
7878
</StyledRadioGroup>
7979
<Divider />
8080
<Spin spinning={disputes.loading}>

‎src/containers/home.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ const StyledImg = styled.img`
1717
export default () => (
1818
<>
1919
<TopBanner
20-
description="Get started by buying PNK if you don't have any already."
20+
description="If you don't have some, buy PNK to get started."
2121
extra={
2222
<Link to="/tokens">
2323
<Button size="large" type="primary">
2424
Buy PNK
2525
</Button>
2626
</Link>
2727
}
28-
title="Welcome to the Kleros Juror Dashboard!"
28+
title="Kleros Juror Dashboard"
2929
/>
3030
<WelcomeCard
3131
icon={<StyledImg alt="Kleros Logo with Dark Text" src={darkLogo} />}

0 commit comments

Comments
 (0)
Please sign in to comment.