Skip to content

PM-210: Fix privacy violations #7034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions __tests__/shared/utils/__snapshots__/markdown.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ Array [
A list item with a code block:
</p>
<code>
&lt;code goes here&gt;
&lt;code&gt;

</code>
</li>
Expand Down Expand Up @@ -1294,7 +1294,7 @@ end tell
ampersands and angle brackets. For example, this:
</p>,
<code>
&lt;div class="footer"&gt;
&lt;div&gt;
&copy; 2004 Foo Corporation
&lt;/div&gt;

Expand Down
110 changes: 0 additions & 110 deletions src/shared/components/Contentful/PasswordScreen/index.jsx

This file was deleted.

51 changes: 0 additions & 51 deletions src/shared/components/Contentful/PasswordScreen/style.scss

This file was deleted.

16 changes: 1 addition & 15 deletions src/shared/components/Contentful/Route.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import PT from 'prop-types';
import React from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import Viewport from 'components/Contentful/Viewport';
import PasswordScreen from 'components/Contentful/PasswordScreen';
import { isomorphy, config } from 'topcoder-react-utils';
import cookies from 'browser-cookies';
import { removeTrailingSlash } from 'utils/url';
Expand Down Expand Up @@ -57,27 +56,14 @@ function ChildRoutesLoader(props) {
{
// eslint-disable-next-line no-nested-ternary
fields.viewport
? (!fields.password ? (
? (
<Viewport
id={fields.viewport.sys.id}
preview={preview}
spaceName={spaceName}
environment={environment}
baseUrl={url}
/>
) : (
<PasswordScreen
password={fields.password}
viewPortId={fields.viewport.sys.id}
preview={preview}
spaceName={spaceName}
environment={environment}
baseUrl={url}
title={fields.passwordScreenTitle}
btnText={fields.passwordScreenButtonText}
content={fields.passwordScreenContent}
/>
)
) : <Error404 />
}
</React.Fragment>
Expand Down
42 changes: 35 additions & 7 deletions src/shared/containers/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,20 @@ class ProfileContainer extends React.Component {
const title = `${handleParam} | Community Profile | Topcoder`;
const description = `Meet Topcoder member ${handleParam} and view their skills and development and design activity. You can also see wins and tenure with Topcoder.`;

const {
copilot,
externalAccounts,
externalLinks,
challenges,
skills,
stats,
lookupData,
badges,
meta,
tcAcademyCertifications,
tcAcademyCourses,
} = this.props;

return (
<React.Fragment>
<MetaTags
Expand All @@ -144,7 +158,19 @@ class ProfileContainer extends React.Component {
{
info ? (
<ProfilePage
{...this.props}
copilot={copilot}
externalAccounts={externalAccounts}
challenges={challenges}
externalLinks={externalLinks}
info={info}
skills={skills}
stats={stats}
lookupData={lookupData}
badges={badges}
handleParam={handleParam}
meta={meta}
tcAcademyCertifications={tcAcademyCertifications}
tcAcademyCourses={tcAcademyCourses}
/>
) : <LoadingIndicator />
}
Expand All @@ -154,9 +180,8 @@ class ProfileContainer extends React.Component {
}

ProfileContainer.defaultProps = {
achievements: null,
copilot: false,
country: '',
challenges: null,
externalAccounts: null,
externalLinks: null,
info: null,
Expand All @@ -166,12 +191,15 @@ ProfileContainer.defaultProps = {
meta: null,
memberGroups: null,
auth: {},
badges: {},
tcAcademyCertifications: [],
tcAcademyCourses: [],
};

ProfileContainer.propTypes = {
achievements: PT.arrayOf(PT.shape()),
badges: PT.shape(),
challenges: PT.arrayOf(PT.shape()),
copilot: PT.bool,
country: PT.string,
externalAccounts: PT.shape(),
externalLinks: PT.arrayOf(PT.shape()),
handleParam: PT.string.isRequired,
Expand All @@ -188,14 +216,14 @@ ProfileContainer.propTypes = {
lookupData: PT.shape().isRequired,
meta: PT.shape(),
auth: PT.shape(),
tcAcademyCertifications: PT.arrayOf(PT.shape()),
tcAcademyCourses: PT.arrayOf(PT.shape()),
};

const mapStateToProps = (state, ownProps) => ({
challenges: state.members[ownProps.match.params.handle]
? state.members[ownProps.match.params.handle].userMarathons : null,
achievements: state.profile.achievements,
copilot: state.profile.copilot,
country: state.profile.country,
externalAccounts: state.profile.externalAccounts,
externalLinks: state.profile.externalLinks,
handleParam: ownProps.match.params.handle,
Expand Down
18 changes: 17 additions & 1 deletion src/shared/containers/ProfileStats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ class ProfileStatsContainer extends React.Component {
handleParam,
track,
subTrack,
stats,
tab,
setTab,
info,
statsDistribution,
statsHistory,
isAlreadyLoadChallenge,
} = this.props;

if (loadingError || !isValidTrack(track, subTrack)) {
Expand All @@ -99,7 +106,16 @@ class ProfileStatsContainer extends React.Component {
isLoading ? <LoadingIndicator />
: (
<ProfileStatsPage
{...this.props}
stats={stats}
handleParam={handleParam}
track={track}
subTrack={subTrack}
tab={tab}
setTab={setTab}
info={info}
statsDistribution={statsDistribution}
statsHistory={statsHistory}
isAlreadyLoadChallenge={isAlreadyLoadChallenge}
/>
)
}
Expand Down
8 changes: 7 additions & 1 deletion src/shared/containers/Toastr/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ class ExtendedReduxToastr extends ReduxToastr {
inMemory={this.toastrFired}
addToMemory={() => this._addToMemory(item.id)}
item={mergedItem}
{...this.props}
toastrs={this.props.toastrs}
preventDuplicates={this.props.preventDuplicates}
position={this.props.position}
transitionIn={this.props.transitionIn}
transitionOut={this.props.transitionOut}
progressBar={this.props.progressBar}
showCloseButton={this.props.showCloseButton}
/>
{item.options && item.options.attention
&& (
Expand Down
Loading
Loading