Skip to content

Commit a345d00

Browse files
committed
PROD-4229 - disable preview button in HM pewview
1 parent 004074c commit a345d00

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

src/apps/learn/src/lib/components/hiring-manager-view/HiringManagerView.module.scss

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
z-index: -1;
5050
}
5151
}
52-
52+
5353
.heroInner {
5454
display: flex;
5555
gap: $sp-10;
@@ -144,7 +144,7 @@
144144
}
145145
.heroCert {
146146
position: relative;
147-
147+
148148
.certActionBtns {
149149
position: absolute;
150150
bottom: $sp-6;
@@ -166,7 +166,7 @@
166166

167167
.wrap {
168168
margin-bottom: 120px;
169-
169+
170170
@include ltemd {
171171
margin-bottom: $sp-4;
172172
}
@@ -188,7 +188,7 @@
188188
background: $black-5;
189189
border-radius: $sp-2;
190190
margin-bottom: $sp-10;
191-
191+
192192
@include ltemd {
193193
border-radius: 0;
194194
margin-left: -$sp-6;
@@ -266,6 +266,10 @@
266266
&:global(.secondary) {
267267
border: 2px solid;
268268
}
269+
270+
&.disabled {
271+
pointer-events: none;
272+
}
269273
}
270274

271275
.colsWrap {
@@ -275,7 +279,7 @@
275279
h2 {
276280
margin-bottom: $sp-6;
277281
}
278-
282+
279283
@include ltemd {
280284
flex-direction: column;
281285
gap: $sp-8;
@@ -298,7 +302,7 @@
298302
width: 1px;
299303
flex: 0 0 auto;
300304
margin: 0 $sp-8;
301-
305+
302306
@include ltemd {
303307
display: none;
304308
}
@@ -347,7 +351,7 @@
347351
.wrap {
348352
margin-bottom: 0;
349353
}
350-
354+
351355
.contentOuter {
352356
max-width: none;
353357

@@ -360,7 +364,7 @@
360364
.courses {
361365
margin-bottom: 0;
362366
}
363-
367+
364368
.colWrap {
365369
&:last-child {
366370
max-width: 25%;
@@ -370,4 +374,4 @@
370374
}
371375
}
372376
}
373-
}
377+
}

src/apps/learn/src/lib/components/hiring-manager-view/HiringManagerView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ const HiringManagerView: FC<HiringManagerViewProps> = (props: HiringManagerViewP
301301
props.isOwner ? 'View your Topcoder profile' : 'View full Topcoder profile'
302302
)}
303303
size='lg'
304-
className={styles.shareBtn}
305-
to={props.isPreview ? '#profile-preview' : myProfileLink}
304+
className={classNames(styles.shareBtn, props.isPreview && styles.disabled)}
305+
to={props.isPreview ? '' : myProfileLink}
306306
target='_blank'
307307
rel='noreferrer'
308308
/>

src/libs/ui/lib/components/button/link-button/LinkButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const LinkButton: FC<LinkButtonProps> = props => {
3838

3939
const button: ReactNode = <Button {...buttonProps} />
4040

41-
if (props.disabled) {
41+
if (props.disabled || !props.to) {
4242
return button
4343
}
4444

0 commit comments

Comments
 (0)