Skip to content

Commit 5f20ad9

Browse files
committed
Merge branch 'dev' of github.com:topcoder-platform/platform-ui into TCA-1179_work-on-linting-issues
2 parents a1a9aed + 7b8d533 commit 5f20ad9

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

src-ts/header/Header.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ const Header: FC = () => {
9090
navElementId,
9191
{
9292
handleNavigation: navigationHandler,
93+
integrations: {
94+
sprig: 'disable',
95+
},
9396
onReady() { setReady(true) },
9497
signIn() { window.location.href = authUrlLogin() },
9598
signOut() { window.location.href = authUrlLogout },

src-ts/tools/learn/learn-lib/hiring-manager-view/HiringManagerView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ function renderBasicList(items: Array<string> = []): ReactNode {
5050
</ul>
5151
)
5252
}
53-
5453
export interface HiringManagerViewProps {
5554
certification?: TCACertification
5655
completedAt?: string
@@ -301,7 +300,7 @@ const HiringManagerView: FC<HiringManagerViewProps> = (props: HiringManagerViewP
301300
<Button
302301
buttonStyle='secondary'
303302
label={props.isOwner ? 'View your Topcoder profile' : 'View full Topcoder profile'}
304-
url={myProfileLink}
303+
url={props.isPreview ? '' : myProfileLink}
305304
target='_blank'
306305
className={styles.shareBtn}
307306
/>

src-ts/tools/learn/tca-certificate/user-certification-view/UserCertificationPreview.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { FC, useContext, useLayoutEffect } from 'react'
2-
import { NavigateFunction, Params, useNavigate, useParams } from 'react-router-dom'
1+
import { FC } from 'react'
2+
import { Params, useParams } from 'react-router-dom'
33

4-
import { LoadingSpinner, profileContext, ProfileContextData, UserProfile } from '../../../../lib'
4+
import { LoadingSpinner, UserProfile } from '../../../../lib'
55
import {
66
TCACertificationEnrollmentBase,
77
TCACertificationProviderData,
@@ -19,31 +19,23 @@ const placeholderUserProfile: UserProfile = {
1919
const placeholderEnrollment: TCACertificationEnrollmentBase = {
2020
completedAt: new Date()
2121
.toISOString(),
22-
completionUuid: 'test-uuid',
22+
completionUuid: 'certificate-number',
2323
userHandle: 'your_handle',
2424
userName: 'Your Name',
2525
} as TCACertificationEnrollmentBase
2626

2727
const UserCertificationPreview: FC<{}> = () => {
28-
const { profile, initialized: profileReady }: ProfileContextData = useContext(profileContext)
29-
const navigate: NavigateFunction = useNavigate()
30-
3128
const routeParams: Params<string> = useParams()
3229

3330
const {
3431
certification,
32+
ready,
3533
}: TCACertificationProviderData
3634
= useGetTCACertification(`${routeParams.certification}`)
3735

38-
useLayoutEffect(() => {
39-
if (profileReady && !profile) {
40-
navigate('..')
41-
}
42-
}, [navigate, profile, profileReady])
43-
4436
return (
4537
<>
46-
<LoadingSpinner hide={profileReady} />
38+
<LoadingSpinner hide={ready} />
4739

4840
<UserCertificationViewBase
4941
enrollment={placeholderEnrollment}

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14396,8 +14396,8 @@ unique-string@^2.0.0:
1439614396
crypto-random-string "^2.0.0"
1439714397

1439814398
"universal-navigation@https://github.com/topcoder-platform/universal-navigation":
14399-
version "1.0.4"
14400-
resolved "https://github.com/topcoder-platform/universal-navigation#332405d1b9fcf780460fdde1ae81c5fe0fbcb41a"
14399+
version "1.0.12"
14400+
resolved "https://github.com/topcoder-platform/universal-navigation#92b8a638a901dedc0b59edb121161d9dabc8333a"
1440114401

1440214402
universalify@^0.2.0:
1440314403
version "0.2.0"

0 commit comments

Comments
 (0)