diff --git a/client/src/components/Intro/index.js b/client/src/components/Intro/index.js
index 69c2934ba5..1eb4bb88df 100644
--- a/client/src/components/Intro/index.js
+++ b/client/src/components/Intro/index.js
@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Link, Spacer, Loader, FullWidthRow } from '../helpers';
import { randomQuote } from '../../utils/get-words';
-import CurrentChallengeLink from '../helpers/CurrentChallengeLink';
+import CurrentChallengeLink from '../helpers/current-challenge-link';
import IntroDescription from './components/IntroDescription';
import { Trans, useTranslation } from 'react-i18next';
diff --git a/client/src/components/helpers/CurrentChallengeLink.js b/client/src/components/helpers/current-challenge-link.tsx
similarity index 57%
rename from client/src/components/helpers/CurrentChallengeLink.js
rename to client/src/components/helpers/current-challenge-link.tsx
index 279ab66056..23e4630530 100644
--- a/client/src/components/helpers/CurrentChallengeLink.js
+++ b/client/src/components/helpers/current-challenge-link.tsx
@@ -1,18 +1,22 @@
import React from 'react';
-import PropTypes from 'prop-types';
import envData from '../../../../config/env.json';
-const { apiLocation } = envData;
+interface EnvData {
+ apiLocation?: string;
+}
+
+const { apiLocation } = envData as EnvData;
const currentChallengeApi = '/challenges/current-challenge';
-const propTypes = {
- children: PropTypes.any,
- isLargeBtn: PropTypes.bool
-};
-
-function CurrentChallengeLink({ children, isLargeBtn }) {
+function CurrentChallengeLink({
+ children,
+ isLargeBtn
+}: {
+ children?: React.ReactNode;
+ isLargeBtn?: boolean;
+}): JSX.Element {
let classNames;
if (isLargeBtn) {
classNames = 'btn btn-lg btn-primary btn-block';
@@ -20,13 +24,15 @@ function CurrentChallengeLink({ children, isLargeBtn }) {
classNames = 'btn btn-primary btn-block';
}
return (
-
+
{children}
);
}
CurrentChallengeLink.displayName = 'CurrentChallengeLink';
-CurrentChallengeLink.propTypes = propTypes;
export default CurrentChallengeLink;
diff --git a/client/src/components/helpers/index.js b/client/src/components/helpers/index.js
index 8e91c441f7..6bc646dc54 100644
--- a/client/src/components/helpers/index.js
+++ b/client/src/components/helpers/index.js
@@ -5,7 +5,7 @@ export { default as Loader } from './loader';
export { default as SkeletonSprite } from './skeleton-sprite';
export { default as Spacer } from './spacer';
export { default as Link } from './link';
-export { default as CurrentChallengeLink } from './CurrentChallengeLink';
+export { default as CurrentChallengeLink } from './current-challenge-link';
export { default as ImageLoader } from './image-loader';
export { default as AvatarRenderer } from './AvatarRenderer';
export { default as borderColorPicker } from './borderColorPicker';
diff --git a/client/tsconfig.json b/client/tsconfig.json
index a1bf75d789..85e57fdbab 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -1,5 +1,5 @@
{
- "include": ["./i18n/**/*", "./plugins/**/*","./src/**/*","./utils/**/*"],
+ "include": ["./i18n/**/*", "./plugins/**/*", "./src/**/*", "./utils/**/*"],
"compilerOptions": {
"target": "es2020",
"module": "es2020",
@@ -11,6 +11,7 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmit": true,
- "skipLibCheck": true
+ "skipLibCheck": true,
+ "resolveJsonModule": true
}
}