Skip to content

Commit 2c7d64d

Browse files
Update LocateYourProfile (#564)
1 parent 329628a commit 2c7d64d

6 files changed

+23
-12
lines changed

lib/all.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/all.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/registration.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/registration.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/ui/LocateYourProfile.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const cx = {
8686
& {
8787
color: ${theme.typoAnchor}
8888
text-decoration: none
89+
cursor: pointer
8990
}
9091
9192
&:hover {
@@ -119,10 +120,11 @@ const cx = {
119120
type Props = {
120121
headline?: string,
121122
isLoading?: boolean,
122-
recover?: () => void
123+
recover?: () => void,
124+
joinClick?: () => void
123125
}
124126

125-
const LocateYourProfile = ({ headline, isLoading, recover }: Props) => (
127+
const LocateYourProfile = ({ headline, isLoading, recover, joinClick }: Props) => (
126128
<div className={cx.wrapper}>
127129
<div className={cx.content}>
128130
{isLoading ? (
@@ -144,7 +146,7 @@ const LocateYourProfile = ({ headline, isLoading, recover }: Props) => (
144146
{headline && (
145147
<p className={cx.headline}>{headline}</p>
146148
)}
147-
<p className={cx.text}><a className={cx.join} href='https://x-team.com/join-application'>Join X-Team</a> if you don’t have an account yet.</p>
149+
<p className={cx.text}><a className={cx.join} onClick={joinClick}>Join X-Team</a> if you don’t have an account yet.</p>
148150
<p className={cx.title}>Already have an account?</p>
149151
<p className={cx.alttext}>Please ensure that you have local storage enabled in your browser.</p>
150152
{recover && (

src/components/ui/LocateYourProfile.stories.js

+14-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ const Body = ({ children }) => (
1616
</div>
1717
)
1818

19+
const joinClick = () => (
20+
console.log('join x-team clicked')
21+
)
22+
1923
storiesOf('UI Components|LocateYourProfile', module)
2024
.add('basic usage', () => (
2125
<Body>
2226
<LocateYourProfile
2327
headline='Locate your profile.'
2428
recover={action('Recover my secret profile Link')}
29+
joinClick={joinClick}
2530
/>
2631
</Body>
2732
))
@@ -33,6 +38,7 @@ storiesOf('UI Components|LocateYourProfile/Use Cases', module)
3338
<LocateYourProfile
3439
headline='Locate your profile.'
3540
recover={action('Recover my secret profile Link')}
41+
joinClick={joinClick}
3642
/>
3743
</ApplicantScreen>
3844
</Body>
@@ -41,11 +47,14 @@ storiesOf('UI Components|LocateYourProfile/Use Cases', module)
4147
storiesOf('UI Components|LocateYourProfile/Debug', module)
4248
.add('loading state', () => (
4349
<Body>
44-
<LocateYourProfile
45-
isLoading
46-
headline='Locate your profile.'
47-
recover={action('Recover my secret profile Link')}
48-
/>
50+
<ApplicantScreen noWrapper>
51+
<LocateYourProfile
52+
isLoading
53+
headline='Locate your profile.'
54+
recover={action('Recover my secret profile Link')}
55+
joinClick={joinClick}
56+
/>
57+
</ApplicantScreen>
4958
</Body>
5059
))
5160
.add('missing props', () => (

0 commit comments

Comments
 (0)