fix(client): remove broken current challenge button (#44405)
This commit is contained in:
committed by
GitHub
parent
979a8d59d9
commit
118bf713ae
@ -4,8 +4,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|||||||
import { emailToABVariant } from '../../utils/A-B-tester';
|
import { emailToABVariant } from '../../utils/A-B-tester';
|
||||||
import { randomQuote } from '../../utils/get-words';
|
import { randomQuote } from '../../utils/get-words';
|
||||||
import Login from '../Header/components/Login';
|
import Login from '../Header/components/Login';
|
||||||
import { Link, Spacer, Loader, FullWidthRow } from '../helpers';
|
import { Link, Spacer, Loader } from '../helpers';
|
||||||
import CurrentChallengeLink from '../helpers/current-challenge-link';
|
|
||||||
import IntroDescription from './components/IntroDescription';
|
import IntroDescription from './components/IntroDescription';
|
||||||
|
|
||||||
import './intro.css';
|
import './intro.css';
|
||||||
@ -57,16 +56,6 @@ const Intro = ({
|
|||||||
: `${t('learn.welcome-2')}`}
|
: `${t('learn.welcome-2')}`}
|
||||||
</h1>
|
</h1>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<FullWidthRow>
|
|
||||||
{completedChallengeCount && completedChallengeCount > 0 ? (
|
|
||||||
<CurrentChallengeLink isLargeBtn={true}>
|
|
||||||
{t('buttons.current-challenge')}
|
|
||||||
</CurrentChallengeLink>
|
|
||||||
) : (
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
</FullWidthRow>
|
|
||||||
<Spacer />
|
|
||||||
<div className='text-center quote-partial'>
|
<div className='text-center quote-partial'>
|
||||||
<blockquote className='blockquote'>
|
<blockquote className='blockquote'>
|
||||||
<span>
|
<span>
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
|
|
||||||
import envData from '../../../../config/env.json';
|
|
||||||
|
|
||||||
interface EnvData {
|
|
||||||
apiLocation: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { apiLocation } = envData as EnvData;
|
|
||||||
|
|
||||||
const currentChallengeApi = '/challenges/current-challenge';
|
|
||||||
|
|
||||||
function CurrentChallengeLink({
|
|
||||||
children,
|
|
||||||
isLargeBtn
|
|
||||||
}: {
|
|
||||||
children?: JSX.ElementChildrenAttribute;
|
|
||||||
isLargeBtn?: boolean;
|
|
||||||
}): JSX.Element {
|
|
||||||
let classNames;
|
|
||||||
if (isLargeBtn) {
|
|
||||||
classNames = 'btn btn-lg btn-primary btn-block';
|
|
||||||
} else {
|
|
||||||
classNames = 'btn btn-primary btn-block';
|
|
||||||
}
|
|
||||||
return (
|
|
||||||
<a className={classNames} href={`${apiLocation}${currentChallengeApi}`}>
|
|
||||||
{children}
|
|
||||||
</a>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrentChallengeLink.displayName = 'CurrentChallengeLink';
|
|
||||||
|
|
||||||
export default CurrentChallengeLink;
|
|
@ -5,7 +5,6 @@ export { default as Loader } from './loader';
|
|||||||
export { default as SkeletonSprite } from './skeleton-sprite';
|
export { default as SkeletonSprite } from './skeleton-sprite';
|
||||||
export { default as Spacer } from './spacer';
|
export { default as Spacer } from './spacer';
|
||||||
export { default as Link } from './link';
|
export { default as Link } from './link';
|
||||||
export { default as CurrentChallengeLink } from './current-challenge-link';
|
|
||||||
export { default as ImageLoader } from './image-loader';
|
export { default as ImageLoader } from './image-loader';
|
||||||
export { default as AvatarRenderer } from './avatar-renderer';
|
export { default as AvatarRenderer } from './avatar-renderer';
|
||||||
export { default as borderColorPicker } from './border-color-picker';
|
export { default as borderColorPicker } from './border-color-picker';
|
||||||
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
import { TFunction, useTranslation } from 'react-i18next';
|
import { TFunction, useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { CurrentChallengeLink, FullWidthRow, Link, Spacer } from '../helpers';
|
import { FullWidthRow, Link, Spacer } from '../helpers';
|
||||||
import { User } from './../../redux/prop-types';
|
import { User } from './../../redux/prop-types';
|
||||||
import Timeline from './components/TimeLine';
|
import Timeline from './components/TimeLine';
|
||||||
import Camper from './components/camper';
|
import Camper from './components/camper';
|
||||||
@ -44,10 +44,6 @@ function renderMessage(
|
|||||||
</p>
|
</p>
|
||||||
</FullWidthRow>
|
</FullWidthRow>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<FullWidthRow>
|
|
||||||
<CurrentChallengeLink>{t('buttons.take-me')}</CurrentChallengeLink>
|
|
||||||
</FullWidthRow>
|
|
||||||
<Spacer />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user