fix: order imports and remove circular dependencies (#41824)
* fix: remove circular dependency redux depended on templates/Challenges/redux and vice versa. This meant that import order mattered and confusing bugs could arise. (cherry picked from commit 7d67a4e70922bbb3051f2f9982dcc69e240d43dc) * feat: require imports to be in alphabetical order Import order generally does not matter, but there are edge cases (circular imports and css imports, for example) where changing order changes behaviour (cherry picked from commit b8d1393a91ec6e068caf8e8498a5c95df68c2b2c) * chore: order imports * fix: lift up challenge description + title comps This brings the classic Show closer to the others as they now all create the description and title components * fix: remove donation-saga/index circular import (cherry picked from commit 51a44ca668a700786d2744feffeae4fdba5fd207) * refactor: extract action-types from settings (cherry picked from commit 25e26124d691c84a0d0827d41dafb761c686fadd) * fix: lint errors * feat: prevent useless renames
This commit is contained in:
committed by
GitHub
parent
c7b27a53e7
commit
e118dda13a
@ -32,6 +32,7 @@
|
|||||||
"import/newline-after-import": 2,
|
"import/newline-after-import": 2,
|
||||||
"import/no-duplicates": 2,
|
"import/no-duplicates": 2,
|
||||||
"import/no-unresolved": [2, { "commonjs": true }],
|
"import/no-unresolved": [2, { "commonjs": true }],
|
||||||
|
"import/order": [2, { "alphabetize": { "order": "asc" } }],
|
||||||
"import/unambiguous": 2,
|
"import/unambiguous": 2,
|
||||||
"import/no-anonymous-default-export": 2,
|
"import/no-anonymous-default-export": 2,
|
||||||
"jsx-quotes": [2, "prefer-single"],
|
"jsx-quotes": [2, "prefer-single"],
|
||||||
@ -122,6 +123,7 @@
|
|||||||
"no-unused-expressions": 2,
|
"no-unused-expressions": 2,
|
||||||
"no-unused-vars": 2,
|
"no-unused-vars": 2,
|
||||||
"no-use-before-define": 0,
|
"no-use-before-define": 0,
|
||||||
|
"no-useless-rename": 2,
|
||||||
"no-void": 0,
|
"no-void": 0,
|
||||||
"no-warning-comments": [2, { "terms": ["fixme"], "location": "start" }],
|
"no-warning-comments": [2, { "terms": ["fixme"], "location": "start" }],
|
||||||
"no-with": 2,
|
"no-with": 2,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { Observable } from 'rx';
|
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
|
import { Observable } from 'rx';
|
||||||
|
|
||||||
import { observeMethod, observeQuery } from '../../server/utils/rx';
|
|
||||||
import {
|
import {
|
||||||
createUserUpdatesFromProfile,
|
createUserUpdatesFromProfile,
|
||||||
getSocialProvider
|
getSocialProvider
|
||||||
} from '../../server/utils/auth';
|
} from '../../server/utils/auth';
|
||||||
|
import { observeMethod, observeQuery } from '../../server/utils/rx';
|
||||||
|
|
||||||
const log = debug('fcc:models:UserCredential');
|
const log = debug('fcc:models:UserCredential');
|
||||||
module.exports = function (UserCredential) {
|
module.exports = function (UserCredential) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
import dedent from 'dedent';
|
||||||
import { Observable } from 'rx';
|
import { Observable } from 'rx';
|
||||||
// import debug from 'debug';
|
// import debug from 'debug';
|
||||||
import dedent from 'dedent';
|
|
||||||
import { isEmail } from 'validator';
|
import { isEmail } from 'validator';
|
||||||
|
|
||||||
import { observeMethod, observeQuery } from '../../server/utils/rx';
|
|
||||||
import { wrapHandledError } from '../../server/utils/create-handled-error.js';
|
import { wrapHandledError } from '../../server/utils/create-handled-error.js';
|
||||||
|
import { observeMethod, observeQuery } from '../../server/utils/rx';
|
||||||
|
|
||||||
// const log = debug('fcc:models:userIdent');
|
// const log = debug('fcc:models:userIdent');
|
||||||
|
|
||||||
|
@ -5,18 +5,31 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import badwordFilter from 'bad-words';
|
||||||
|
import debugFactory from 'debug';
|
||||||
|
import dedent from 'dedent';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import moment from 'moment';
|
||||||
|
import generate from 'nanoid/generate';
|
||||||
import { Observable } from 'rx';
|
import { Observable } from 'rx';
|
||||||
import uuid from 'uuid/v4';
|
import uuid from 'uuid/v4';
|
||||||
import moment from 'moment';
|
|
||||||
import dedent from 'dedent';
|
|
||||||
import debugFactory from 'debug';
|
|
||||||
import { isEmail } from 'validator';
|
import { isEmail } from 'validator';
|
||||||
import _ from 'lodash';
|
|
||||||
import generate from 'nanoid/generate';
|
|
||||||
import badwordFilter from 'bad-words';
|
|
||||||
|
|
||||||
|
import { blocklistedUsernames } from '../../../../config/constants';
|
||||||
import { apiLocation } from '../../../../config/env.json';
|
import { apiLocation } from '../../../../config/env.json';
|
||||||
|
|
||||||
|
import { wrapHandledError } from '../../server/utils/create-handled-error.js';
|
||||||
|
import {
|
||||||
|
setAccessTokenToResponse,
|
||||||
|
removeCookies
|
||||||
|
} from '../../server/utils/getSetAccessToken';
|
||||||
|
import {
|
||||||
|
normaliseUserFields,
|
||||||
|
getProgress,
|
||||||
|
publicUserProps
|
||||||
|
} from '../../server/utils/publicUserProps';
|
||||||
|
import { saveUser, observeMethod } from '../../server/utils/rx.js';
|
||||||
|
import { getEmailSender } from '../../server/utils/url-utils';
|
||||||
import {
|
import {
|
||||||
fixCompletedChallengeItem,
|
fixCompletedChallengeItem,
|
||||||
getEncodedEmail,
|
getEncodedEmail,
|
||||||
@ -26,20 +39,6 @@ import {
|
|||||||
renderSignInEmail
|
renderSignInEmail
|
||||||
} from '../utils';
|
} from '../utils';
|
||||||
|
|
||||||
import { blocklistedUsernames } from '../../../../config/constants';
|
|
||||||
import { wrapHandledError } from '../../server/utils/create-handled-error.js';
|
|
||||||
import { saveUser, observeMethod } from '../../server/utils/rx.js';
|
|
||||||
import { getEmailSender } from '../../server/utils/url-utils';
|
|
||||||
import {
|
|
||||||
normaliseUserFields,
|
|
||||||
getProgress,
|
|
||||||
publicUserProps
|
|
||||||
} from '../../server/utils/publicUserProps';
|
|
||||||
import {
|
|
||||||
setAccessTokenToResponse,
|
|
||||||
removeCookies
|
|
||||||
} from '../../server/utils/getSetAccessToken';
|
|
||||||
|
|
||||||
const log = debugFactory('fcc:models:user');
|
const log = debugFactory('fcc:models:user');
|
||||||
const BROWNIEPOINTS_TIMEOUT = [1, 'hour'];
|
const BROWNIEPOINTS_TIMEOUT = [1, 'hour'];
|
||||||
const nanoidCharSet =
|
const nanoidCharSet =
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
|
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
|
||||||
|
|
||||||
|
const createDebugger = require('debug');
|
||||||
const nodemon = require('nodemon');
|
const nodemon = require('nodemon');
|
||||||
const SmeeClient = require('smee-client');
|
const SmeeClient = require('smee-client');
|
||||||
const createDebugger = require('debug');
|
|
||||||
|
|
||||||
const log = createDebugger('fcc:start:development');
|
const log = createDebugger('fcc:start:development');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// this ensures node understands the future
|
// this ensures node understands the future
|
||||||
const _ = require('lodash');
|
|
||||||
const createDebugger = require('debug');
|
const createDebugger = require('debug');
|
||||||
|
const _ = require('lodash');
|
||||||
|
|
||||||
const log = createDebugger('fcc:server:production-start');
|
const log = createDebugger('fcc:server:production-start');
|
||||||
const startTime = Date.now();
|
const startTime = Date.now();
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import passport from 'passport';
|
|
||||||
import dedent from 'dedent';
|
import dedent from 'dedent';
|
||||||
import { check } from 'express-validator';
|
import { check } from 'express-validator';
|
||||||
import { isEmail } from 'validator';
|
|
||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
|
import passport from 'passport';
|
||||||
|
import { isEmail } from 'validator';
|
||||||
|
|
||||||
import { jwtSecret } from '../../../../config/secrets';
|
import { jwtSecret } from '../../../../config/secrets';
|
||||||
|
|
||||||
|
import { decodeEmail } from '../../common/utils';
|
||||||
import {
|
import {
|
||||||
createPassportCallbackAuthenticator,
|
createPassportCallbackAuthenticator,
|
||||||
devSaveResponseAuthCookies,
|
devSaveResponseAuthCookies,
|
||||||
devLoginRedirect
|
devLoginRedirect
|
||||||
} from '../component-passport';
|
} from '../component-passport';
|
||||||
import { ifUserRedirectTo, ifNoUserRedirectHome } from '../utils/middleware';
|
|
||||||
import { wrapHandledError } from '../utils/create-handled-error.js';
|
import { wrapHandledError } from '../utils/create-handled-error.js';
|
||||||
import { removeCookies } from '../utils/getSetAccessToken';
|
import { removeCookies } from '../utils/getSetAccessToken';
|
||||||
import { decodeEmail } from '../../common/utils';
|
import { ifUserRedirectTo, ifNoUserRedirectHome } from '../utils/middleware';
|
||||||
import { getRedirectParams } from '../utils/redirection';
|
import { getRedirectParams } from '../utils/redirection';
|
||||||
|
|
||||||
const passwordlessGetValidators = [
|
const passwordlessGetValidators = [
|
||||||
|
@ -1,17 +1,10 @@
|
|||||||
|
import path from 'path';
|
||||||
|
import debug from 'debug';
|
||||||
|
import dedent from 'dedent';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import loopback from 'loopback';
|
import loopback from 'loopback';
|
||||||
import path from 'path';
|
|
||||||
import dedent from 'dedent';
|
|
||||||
import { Observable } from 'rx';
|
import { Observable } from 'rx';
|
||||||
import debug from 'debug';
|
|
||||||
import { isEmail } from 'validator';
|
import { isEmail } from 'validator';
|
||||||
import { reportError } from '../middlewares/sentry-error-handler.js';
|
|
||||||
|
|
||||||
import { ifNoUser401 } from '../utils/middleware';
|
|
||||||
import { observeQuery } from '../utils/rx';
|
|
||||||
|
|
||||||
import { getChallenges } from '../utils/get-curriculum';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
completionHours,
|
completionHours,
|
||||||
certTypes,
|
certTypes,
|
||||||
@ -22,6 +15,11 @@ import {
|
|||||||
oldDataVizId,
|
oldDataVizId,
|
||||||
superBlockCertTypeMap
|
superBlockCertTypeMap
|
||||||
} from '../../../../config/certification-settings';
|
} from '../../../../config/certification-settings';
|
||||||
|
import { reportError } from '../middlewares/sentry-error-handler.js';
|
||||||
|
|
||||||
|
import { getChallenges } from '../utils/get-curriculum';
|
||||||
|
import { ifNoUser401 } from '../utils/middleware';
|
||||||
|
import { observeQuery } from '../utils/rx';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
legacyFrontEndChallengeId,
|
legacyFrontEndChallengeId,
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
* a db migration to fix all completedChallenges
|
* a db migration to fix all completedChallenges
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { Observable } from 'rx';
|
|
||||||
import { isEmpty, pick, omit, find, uniqBy } from 'lodash';
|
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import dedent from 'dedent';
|
import dedent from 'dedent';
|
||||||
|
import { isEmpty, pick, omit, find, uniqBy } from 'lodash';
|
||||||
import { ObjectID } from 'mongodb';
|
import { ObjectID } from 'mongodb';
|
||||||
|
import { Observable } from 'rx';
|
||||||
import isNumeric from 'validator/lib/isNumeric';
|
import isNumeric from 'validator/lib/isNumeric';
|
||||||
import isURL from 'validator/lib/isURL';
|
import isURL from 'validator/lib/isURL';
|
||||||
|
|
||||||
import { ifNoUserSend } from '../utils/middleware';
|
|
||||||
import { fixCompletedChallengeItem } from '../../common/utils';
|
import { fixCompletedChallengeItem } from '../../common/utils';
|
||||||
import { getChallenges } from '../utils/get-curriculum';
|
import { getChallenges } from '../utils/get-curriculum';
|
||||||
|
import { ifNoUserSend } from '../utils/middleware';
|
||||||
import {
|
import {
|
||||||
getRedirectParams,
|
getRedirectParams,
|
||||||
normalizeParams,
|
normalizeParams,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
|
import keys from '../../../../config/secrets';
|
||||||
import {
|
import {
|
||||||
getAsyncPaypalToken,
|
getAsyncPaypalToken,
|
||||||
verifyWebHook,
|
verifyWebHook,
|
||||||
updateUser,
|
updateUser,
|
||||||
verifyWebHookType
|
verifyWebHookType
|
||||||
} from '../utils/donation';
|
} from '../utils/donation';
|
||||||
import keys from '../../../../config/secrets';
|
|
||||||
|
|
||||||
const log = debug('fcc:boot:donate');
|
const log = debug('fcc:boot:donate');
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import { check } from 'express-validator';
|
import { check } from 'express-validator';
|
||||||
|
|
||||||
import { ifNoUser401, createValidatorErrorHandler } from '../utils/middleware';
|
|
||||||
import { themes } from '../../common/utils/themes.js';
|
|
||||||
import { alertTypes } from '../../common/utils/flash.js';
|
|
||||||
import { isValidUsername } from '../../../../utils/validate';
|
import { isValidUsername } from '../../../../utils/validate';
|
||||||
|
import { alertTypes } from '../../common/utils/flash.js';
|
||||||
|
import { themes } from '../../common/utils/themes.js';
|
||||||
|
import { ifNoUser401, createValidatorErrorHandler } from '../utils/middleware';
|
||||||
|
|
||||||
const log = debug('fcc:boot:settings');
|
const log = debug('fcc:boot:settings');
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
import dedent from 'dedent';
|
|
||||||
import debugFactory from 'debug';
|
import debugFactory from 'debug';
|
||||||
|
import dedent from 'dedent';
|
||||||
|
import { body } from 'express-validator';
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
import { Observable } from 'rx';
|
import { Observable } from 'rx';
|
||||||
import { body } from 'express-validator';
|
|
||||||
|
|
||||||
|
import { fixCompletedChallengeItem } from '../../common/utils';
|
||||||
|
import { removeCookies } from '../utils/getSetAccessToken';
|
||||||
|
import { ifNoUser401, ifNoUserRedirectHome } from '../utils/middleware';
|
||||||
import {
|
import {
|
||||||
getProgress,
|
getProgress,
|
||||||
normaliseUserFields,
|
normaliseUserFields,
|
||||||
userPropsForSession
|
userPropsForSession
|
||||||
} from '../utils/publicUserProps';
|
} from '../utils/publicUserProps';
|
||||||
import { fixCompletedChallengeItem } from '../../common/utils';
|
|
||||||
import { ifNoUser401, ifNoUserRedirectHome } from '../utils/middleware';
|
|
||||||
import { removeCookies } from '../utils/getSetAccessToken';
|
|
||||||
import { trimTags } from '../utils/validators';
|
|
||||||
import { getRedirectParams } from '../utils/redirection';
|
import { getRedirectParams } from '../utils/redirection';
|
||||||
|
import { trimTags } from '../utils/validators';
|
||||||
|
|
||||||
const log = debugFactory('fcc:boot:user');
|
const log = debugFactory('fcc:boot:user');
|
||||||
const sendNonUserToHome = ifNoUserRedirectHome();
|
const sendNonUserToHome = ifNoUserRedirectHome();
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import passport from 'passport';
|
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
import {
|
import {
|
||||||
// prettier ignore
|
// prettier ignore
|
||||||
PassportConfigurator
|
PassportConfigurator
|
||||||
} from '@freecodecamp/loopback-component-passport';
|
} from '@freecodecamp/loopback-component-passport';
|
||||||
import dedent from 'dedent';
|
import dedent from 'dedent';
|
||||||
|
import passport from 'passport';
|
||||||
|
|
||||||
import { getUserById } from './utils/user-stats';
|
import { availableLangs } from '../../../config/i18n/all-langs';
|
||||||
|
import { jwtSecret } from '../../../config/secrets';
|
||||||
import passportProviders from './passport-providers';
|
import passportProviders from './passport-providers';
|
||||||
import { setAccessTokenToResponse } from './utils/getSetAccessToken';
|
import { setAccessTokenToResponse } from './utils/getSetAccessToken';
|
||||||
import {
|
import {
|
||||||
@ -15,8 +16,7 @@ import {
|
|||||||
getRedirectParams,
|
getRedirectParams,
|
||||||
haveSamePath
|
haveSamePath
|
||||||
} from './utils/redirection';
|
} from './utils/redirection';
|
||||||
import { jwtSecret } from '../../../config/secrets';
|
import { getUserById } from './utils/user-stats';
|
||||||
import { availableLangs } from '../../../config/i18n/all-langs';
|
|
||||||
|
|
||||||
const passportOptions = {
|
const passportOptions = {
|
||||||
emailOptional: true,
|
emailOptional: true,
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
require('dotenv').config({ path: path.resolve(__dirname, '../../../.env') });
|
require('dotenv').config({ path: path.resolve(__dirname, '../../../.env') });
|
||||||
|
|
||||||
|
const Sentry = require('@sentry/node');
|
||||||
|
const createDebugger = require('debug');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const loopback = require('loopback');
|
const loopback = require('loopback');
|
||||||
const boot = require('loopback-boot');
|
const boot = require('loopback-boot');
|
||||||
const createDebugger = require('debug');
|
|
||||||
const morgan = require('morgan');
|
const morgan = require('morgan');
|
||||||
const Sentry = require('@sentry/node');
|
|
||||||
|
|
||||||
const { sentry } = require('../../../config/secrets');
|
const { sentry } = require('../../../config/secrets');
|
||||||
const { setupPassport } = require('./component-passport');
|
const { setupPassport } = require('./component-passport');
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { homeLocation } from '../../../../config/env.json';
|
|
||||||
import { allowedOrigins } from '../../../../config/cors-settings';
|
import { allowedOrigins } from '../../../../config/cors-settings';
|
||||||
|
import { homeLocation } from '../../../../config/env.json';
|
||||||
|
|
||||||
export default function constantHeaders() {
|
export default function constantHeaders() {
|
||||||
return function (req, res, next) {
|
return function (req, res, next) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Observable } from 'rx';
|
|
||||||
import { login } from 'passport/lib/http/request';
|
import { login } from 'passport/lib/http/request';
|
||||||
|
import { Observable } from 'rx';
|
||||||
|
|
||||||
// make login polymorphic
|
// make login polymorphic
|
||||||
// if supplied callback it works as normal
|
// if supplied callback it works as normal
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
|
|
||||||
import { getUserById as _getUserById } from '../utils/user-stats';
|
import { jwtSecret as _jwtSecret } from '../../../../config/secrets';
|
||||||
|
|
||||||
|
import { wrapHandledError } from '../utils/create-handled-error';
|
||||||
import {
|
import {
|
||||||
getAccessTokenFromRequest,
|
getAccessTokenFromRequest,
|
||||||
errorTypes,
|
errorTypes,
|
||||||
authHeaderNS
|
authHeaderNS
|
||||||
} from '../utils/getSetAccessToken';
|
} from '../utils/getSetAccessToken';
|
||||||
import { jwtSecret as _jwtSecret } from '../../../../config/secrets';
|
|
||||||
|
|
||||||
import { wrapHandledError } from '../utils/create-handled-error';
|
|
||||||
import { getRedirectParams } from '../utils/redirection';
|
import { getRedirectParams } from '../utils/redirection';
|
||||||
|
import { getUserById as _getUserById } from '../utils/user-stats';
|
||||||
|
|
||||||
const authRE = /^\/auth\//;
|
const authRE = /^\/auth\//;
|
||||||
const confirmEmailRE = /^\/confirm-email$/;
|
const confirmEmailRE = /^\/confirm-email$/;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { mockReq as mockRequest, mockRes } from '../boot_tests/challenge.test';
|
|
||||||
import jwt from 'jsonwebtoken';
|
import jwt from 'jsonwebtoken';
|
||||||
|
|
||||||
import { homeLocation } from '../../../../config/env.json';
|
import { homeLocation } from '../../../../config/env.json';
|
||||||
|
import { mockReq as mockRequest, mockRes } from '../boot_tests/challenge.test';
|
||||||
import createRequestAuthorization, {
|
import createRequestAuthorization, {
|
||||||
isAllowedPath
|
isAllowedPath
|
||||||
} from './request-authorization';
|
} from './request-authorization';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import session from 'express-session';
|
|
||||||
import MongoStoreFactory from 'connect-mongo';
|
import MongoStoreFactory from 'connect-mongo';
|
||||||
|
import session from 'express-session';
|
||||||
|
|
||||||
const MongoStore = MongoStoreFactory(session);
|
const MongoStore = MongoStoreFactory(session);
|
||||||
const sessionSecret = process.env.SESSION_SECRET;
|
const sessionSecret = process.env.SESSION_SECRET;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Observable } from 'rx';
|
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
|
import { Observable } from 'rx';
|
||||||
|
|
||||||
import { reportError } from '../middlewares/sentry-error-handler.js';
|
import { reportError } from '../middlewares/sentry-error-handler.js';
|
||||||
import InMemoryCache from '../utils/in-memory-cache';
|
import InMemoryCache from '../utils/in-memory-cache';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { auth0 } from '../../../config/secrets';
|
|
||||||
import { homeLocation, apiLocation } from '../../../config/env.json';
|
import { homeLocation, apiLocation } from '../../../config/env.json';
|
||||||
|
import { auth0 } from '../../../config/secrets';
|
||||||
|
|
||||||
const { clientID, clientSecret, domain } = auth0;
|
const { clientID, clientSecret, domain } = auth0;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
|
||||||
import compareDesc from 'date-fns/compare_desc';
|
import compareDesc from 'date-fns/compare_desc';
|
||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { getLybsynFeed } from './lybsyn';
|
import { getLybsynFeed } from './lybsyn';
|
||||||
|
|
||||||
|
@ -1,14 +1,6 @@
|
|||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import keys from '../../../../config/secrets';
|
import keys from '../../../../config/secrets';
|
||||||
import {
|
|
||||||
getAsyncPaypalToken,
|
|
||||||
verifyWebHook,
|
|
||||||
updateUser,
|
|
||||||
capitalizeKeys,
|
|
||||||
createDonationObj
|
|
||||||
} from './donation';
|
|
||||||
import { mockActivationHook, mockCancellationHook } from './__mocks__/donation';
|
|
||||||
import {
|
import {
|
||||||
mockApp,
|
mockApp,
|
||||||
createDonationMockFn,
|
createDonationMockFn,
|
||||||
@ -16,6 +8,14 @@ import {
|
|||||||
updateDonationAttr,
|
updateDonationAttr,
|
||||||
updateUserAttr
|
updateUserAttr
|
||||||
} from '../boot_tests/fixtures';
|
} from '../boot_tests/fixtures';
|
||||||
|
import { mockActivationHook, mockCancellationHook } from './__mocks__/donation';
|
||||||
|
import {
|
||||||
|
getAsyncPaypalToken,
|
||||||
|
verifyWebHook,
|
||||||
|
updateUser,
|
||||||
|
capitalizeKeys,
|
||||||
|
createDonationObj
|
||||||
|
} from './donation';
|
||||||
|
|
||||||
jest.mock('axios');
|
jest.mock('axios');
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import jwt from 'jsonwebtoken';
|
|
||||||
import { isBefore } from 'date-fns';
|
import { isBefore } from 'date-fns';
|
||||||
|
import jwt from 'jsonwebtoken';
|
||||||
|
|
||||||
import { jwtSecret as _jwtSecret } from '../../../../config/secrets';
|
import { jwtSecret as _jwtSecret } from '../../../../config/secrets';
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
import jwt from 'jsonwebtoken';
|
||||||
|
import { mockReq, mockRes } from '../boot_tests/challenge.test';
|
||||||
import {
|
import {
|
||||||
getAccessTokenFromRequest,
|
getAccessTokenFromRequest,
|
||||||
errorTypes,
|
errorTypes,
|
||||||
setAccessTokenToResponse,
|
setAccessTokenToResponse,
|
||||||
removeCookies
|
removeCookies
|
||||||
} from './getSetAccessToken';
|
} from './getSetAccessToken';
|
||||||
import { mockReq, mockRes } from '../boot_tests/challenge.test';
|
|
||||||
import jwt from 'jsonwebtoken';
|
|
||||||
|
|
||||||
describe('getSetAccessToken', () => {
|
describe('getSetAccessToken', () => {
|
||||||
const validJWTSecret = 'this is a super secret string';
|
const validJWTSecret = 'this is a super secret string';
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { isURL } from 'validator';
|
import { isURL } from 'validator';
|
||||||
|
|
||||||
import { addPlaceholderImage } from './';
|
|
||||||
import {
|
import {
|
||||||
prepUniqueDaysByHours,
|
prepUniqueDaysByHours,
|
||||||
calcCurrentStreak,
|
calcCurrentStreak,
|
||||||
calcLongestStreak
|
calcLongestStreak
|
||||||
} from '../utils/user-stats';
|
} from '../utils/user-stats';
|
||||||
|
import { addPlaceholderImage } from './';
|
||||||
|
|
||||||
export const publicUserProps = [
|
export const publicUserProps = [
|
||||||
'about',
|
'about',
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
const jwt = require('jsonwebtoken');
|
const jwt = require('jsonwebtoken');
|
||||||
const { availableLangs } = require('../../../../config/i18n/all-langs');
|
|
||||||
const { allowedOrigins } = require('../../../../config/cors-settings');
|
const { allowedOrigins } = require('../../../../config/cors-settings');
|
||||||
// homeLocation is being used as a fallback here. If the one provided by the
|
// homeLocation is being used as a fallback here. If the one provided by the
|
||||||
// client is invalid we default to this.
|
// client is invalid we default to this.
|
||||||
const { homeLocation } = require('../../../../config/env.json');
|
const { homeLocation } = require('../../../../config/env.json');
|
||||||
|
const { availableLangs } = require('../../../../config/i18n/all-langs');
|
||||||
|
|
||||||
function getReturnTo(encryptedParams, secret, _homeLocation = homeLocation) {
|
function getReturnTo(encryptedParams, secret, _homeLocation = homeLocation) {
|
||||||
let params;
|
let params;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Rx, { AsyncSubject, Observable } from 'rx';
|
|
||||||
import moment from 'moment';
|
|
||||||
import debugFactory from 'debug';
|
import debugFactory from 'debug';
|
||||||
|
import moment from 'moment';
|
||||||
|
import Rx, { AsyncSubject, Observable } from 'rx';
|
||||||
|
|
||||||
const debug = debugFactory('fcc:rxUtils');
|
const debug = debugFactory('fcc:rxUtils');
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import loopback from 'loopback';
|
import { isEmpty } from 'lodash';
|
||||||
import compose from 'lodash/fp/compose';
|
import compose from 'lodash/fp/compose';
|
||||||
|
import forEachRight from 'lodash/fp/forEachRight';
|
||||||
|
import last from 'lodash/fp/last';
|
||||||
import map from 'lodash/fp/map';
|
import map from 'lodash/fp/map';
|
||||||
import sortBy from 'lodash/fp/sortBy';
|
import sortBy from 'lodash/fp/sortBy';
|
||||||
import trans from 'lodash/fp/transform';
|
import trans from 'lodash/fp/transform';
|
||||||
import last from 'lodash/fp/last';
|
import loopback from 'loopback';
|
||||||
import forEachRight from 'lodash/fp/forEachRight';
|
|
||||||
import { isEmpty } from 'lodash';
|
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
|
|
||||||
import { dayCount } from '../utils/date-utils';
|
import { dayCount } from '../utils/date-utils';
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
|
|
||||||
|
import { mockUserID, mockApp, mockUser } from '../boot_tests/fixtures';
|
||||||
import {
|
import {
|
||||||
prepUniqueDaysByHours,
|
prepUniqueDaysByHours,
|
||||||
calcCurrentStreak,
|
calcCurrentStreak,
|
||||||
calcLongestStreak,
|
calcLongestStreak,
|
||||||
getUserById
|
getUserById
|
||||||
} from './user-stats';
|
} from './user-stats';
|
||||||
import { mockUserID, mockApp, mockUser } from '../boot_tests/fixtures';
|
|
||||||
|
|
||||||
jest.useFakeTimers('modern');
|
jest.useFakeTimers('modern');
|
||||||
const PST = 'America/Los_Angeles';
|
const PST = 'America/Los_Angeles';
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Provider } from 'react-redux';
|
|
||||||
import { I18nextProvider } from 'react-i18next';
|
|
||||||
import cookies from 'browser-cookies';
|
import cookies from 'browser-cookies';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
import { I18nextProvider } from 'react-i18next';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
|
|
||||||
import i18n from './i18n/config';
|
import i18n from './i18n/config';
|
||||||
import { createStore } from './src/redux/createStore';
|
|
||||||
import AppMountNotifier from './src/components/app-mount-notifier';
|
import AppMountNotifier from './src/components/app-mount-notifier';
|
||||||
|
import { createStore } from './src/redux/createStore';
|
||||||
import layoutSelector from './utils/gatsby/layout-selector';
|
import layoutSelector from './utils/gatsby/layout-selector';
|
||||||
|
|
||||||
const store = createStore();
|
const store = createStore();
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
const env = require('../config/env.json');
|
|
||||||
const webpack = require('webpack');
|
|
||||||
|
|
||||||
const { createFilePath } = require('gatsby-source-filesystem');
|
const { createFilePath } = require('gatsby-source-filesystem');
|
||||||
// TODO: ideally we'd remove lodash and just use lodash-es, but we can't require
|
// TODO: ideally we'd remove lodash and just use lodash-es, but we can't require
|
||||||
// es modules here.
|
// es modules here.
|
||||||
const uniq = require('lodash/uniq');
|
const uniq = require('lodash/uniq');
|
||||||
|
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||||
|
const webpack = require('webpack');
|
||||||
|
const env = require('../config/env.json');
|
||||||
|
|
||||||
const { blockNameify } = require('../utils/block-nameify');
|
const { blockNameify } = require('../utils/block-nameify');
|
||||||
const {
|
const {
|
||||||
@ -165,8 +165,6 @@ exports.createPages = function createPages({ graphql, actions, reporter }) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
|
||||||
|
|
||||||
exports.onCreateWebpackConfig = ({ stage, actions }) => {
|
exports.onCreateWebpackConfig = ({ stage, actions }) => {
|
||||||
const newPlugins = [
|
const newPlugins = [
|
||||||
// We add the shims of the node globals to the global scope
|
// We add the shims of the node globals to the global scope
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Provider } from 'react-redux';
|
import React from 'react';
|
||||||
import { I18nextProvider } from 'react-i18next';
|
import { I18nextProvider } from 'react-i18next';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
|
|
||||||
import i18n from './i18n/config';
|
import i18n from './i18n/config';
|
||||||
import { createStore } from './src/redux/createStore';
|
import { createStore } from './src/redux/createStore';
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { availableLangs } = require('../../config/i18n/all-langs');
|
const { availableLangs } = require('../../config/i18n/all-langs');
|
||||||
|
const introSchema = require('./locales/english/intro.json');
|
||||||
|
const linksSchema = require('./locales/english/links.json');
|
||||||
|
const metaTagsSchema = require('./locales/english/meta-tags.json');
|
||||||
|
const motivationSchema = require('./locales/english/motivation.json');
|
||||||
const translationsSchema = require('./locales/english/translations.json');
|
const translationsSchema = require('./locales/english/translations.json');
|
||||||
const trendingSchema = require('./locales/english/trending.json');
|
const trendingSchema = require('./locales/english/trending.json');
|
||||||
const motivationSchema = require('./locales/english/motivation.json');
|
|
||||||
const introSchema = require('./locales/english/intro.json');
|
|
||||||
const metaTagsSchema = require('./locales/english/meta-tags.json');
|
|
||||||
const linksSchema = require('./locales/english/links.json');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flattens a nested object structure into a single
|
* Flattens a nested object structure into a single
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const translationsObject = require('./locales/english/translations.json');
|
|
||||||
const introObject = require('./locales/english/intro.json');
|
const introObject = require('./locales/english/intro.json');
|
||||||
|
const linksObject = require('./locales/english/links.json');
|
||||||
const metaObject = require('./locales/english/meta-tags.json');
|
const metaObject = require('./locales/english/meta-tags.json');
|
||||||
const motivationObject = require('./locales/english/motivation.json');
|
const motivationObject = require('./locales/english/motivation.json');
|
||||||
|
const translationsObject = require('./locales/english/translations.json');
|
||||||
const trendingObject = require('./locales/english/trending.json');
|
const trendingObject = require('./locales/english/trending.json');
|
||||||
const linksObject = require('./locales/english/links.json');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to flatten a nested object. Written specifically for
|
* Function to flatten a nested object. Written specifically for
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import ReactGA from 'react-ga';
|
import ReactGA from 'react-ga';
|
||||||
import envData from '../../../config/env.json';
|
|
||||||
import {
|
import {
|
||||||
devAnalyticsId,
|
devAnalyticsId,
|
||||||
prodAnalyticsId
|
prodAnalyticsId
|
||||||
} from '../../../config/analytics-settings';
|
} from '../../../config/analytics-settings';
|
||||||
|
import envData from '../../../config/env.json';
|
||||||
|
|
||||||
const { deploymentEnv } = envData;
|
const { deploymentEnv } = envData;
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ResponsiveDesign from './responsive-design';
|
import APIIcon from './API-icon';
|
||||||
|
import D3Icon from './D3-icon';
|
||||||
import JavaScriptIcon from './JavaScript-icon';
|
import JavaScriptIcon from './JavaScript-icon';
|
||||||
import ReactIcon from './React-icon';
|
import ReactIcon from './React-icon';
|
||||||
import D3Icon from './D3-icon';
|
|
||||||
import APIIcon from './API-icon';
|
|
||||||
import Clipboard from './clipboard';
|
|
||||||
import PythonIcon from './python-icon';
|
|
||||||
import Analytics from './analytics';
|
|
||||||
import Shield from './shield';
|
|
||||||
import TensorflowIcon from './Tensorflow-icon';
|
import TensorflowIcon from './Tensorflow-icon';
|
||||||
import Algorithm from './algorithm';
|
import Algorithm from './algorithm';
|
||||||
|
import Analytics from './analytics';
|
||||||
|
import Clipboard from './clipboard';
|
||||||
|
import PythonIcon from './python-icon';
|
||||||
|
import ResponsiveDesign from './responsive-design';
|
||||||
|
import Shield from './shield';
|
||||||
|
|
||||||
const iconMap = {
|
const iconMap = {
|
||||||
'responsive-web-design': ResponsiveDesign,
|
'responsive-web-design': ResponsiveDesign,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import AppleLogo from './apple-logo';
|
|
||||||
import AmazonLogo from './amazon-logo';
|
import AmazonLogo from './amazon-logo';
|
||||||
|
import AppleLogo from './apple-logo';
|
||||||
|
import AsSeenInText from './as-seen-in-text';
|
||||||
|
import GoogleLogo from './google-logo';
|
||||||
import MicrosoftLogo from './microsoft-logo';
|
import MicrosoftLogo from './microsoft-logo';
|
||||||
import SpotifyLogo from './spotify-logo';
|
import SpotifyLogo from './spotify-logo';
|
||||||
import GoogleLogo from './google-logo';
|
|
||||||
import AsSeenInText from './as-seen-in-text';
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
AmazonLogo,
|
AmazonLogo,
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
|
||||||
import { bindActionCreators, Dispatch } from 'redux';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import { Grid, Row, Col, Image, Button } from '@freecodecamp/react-bootstrap';
|
import { Grid, Row, Col, Image, Button } from '@freecodecamp/react-bootstrap';
|
||||||
|
import { isEmpty } from 'lodash-es';
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { bindActionCreators, Dispatch } from 'redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import ShowProjectLinks from './show-project-links';
|
import envData from '../../../config/env.json';
|
||||||
|
import { langCodes } from '../../../config/i18n/all-langs';
|
||||||
import FreeCodeCampLogo from '../assets/icons/FreeCodeCamp-logo';
|
import FreeCodeCampLogo from '../assets/icons/FreeCodeCamp-logo';
|
||||||
import DonateForm from '../components/Donation/DonateForm';
|
import DonateForm from '../components/Donation/DonateForm';
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
|
import { createFlashMessage } from '../components/Flash/redux';
|
||||||
|
import { Loader, Spacer } from '../components/helpers';
|
||||||
|
import RedirectHome from '../components/redirect-home';
|
||||||
import {
|
import {
|
||||||
showCertSelector,
|
showCertSelector,
|
||||||
showCertFetchStateSelector,
|
showCertFetchStateSelector,
|
||||||
@ -20,17 +25,12 @@ import {
|
|||||||
userByNameSelector,
|
userByNameSelector,
|
||||||
fetchProfileForUser
|
fetchProfileForUser
|
||||||
} from '../redux';
|
} from '../redux';
|
||||||
import { certMap } from '../resources/cert-and-project-map';
|
|
||||||
import { createFlashMessage } from '../components/Flash/redux';
|
|
||||||
import standardErrorMessage from '../utils/standard-error-message';
|
|
||||||
import reallyWeirdErrorMessage from '../utils/really-weird-error-message';
|
|
||||||
import { langCodes } from '../../../config/i18n/all-langs';
|
|
||||||
import envData from '../../../config/env.json';
|
|
||||||
|
|
||||||
import RedirectHome from '../components/redirect-home';
|
|
||||||
import { Loader, Spacer } from '../components/helpers';
|
|
||||||
import { isEmpty } from 'lodash-es';
|
|
||||||
import { UserType } from '../redux/prop-types';
|
import { UserType } from '../redux/prop-types';
|
||||||
|
import { certMap } from '../resources/cert-and-project-map';
|
||||||
|
import reallyWeirdErrorMessage from '../utils/really-weird-error-message';
|
||||||
|
import standardErrorMessage from '../utils/standard-error-message';
|
||||||
|
|
||||||
|
import ShowProjectLinks from './show-project-links';
|
||||||
|
|
||||||
const { clientLocale } = envData as { clientLocale: keyof typeof langCodes };
|
const { clientLocale } = envData as { clientLocale: keyof typeof langCodes };
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
|
import { isEmpty } from 'lodash-es';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { isEmpty } from 'lodash-es';
|
|
||||||
|
|
||||||
|
import { isBrowser } from '../../utils/index';
|
||||||
|
import FourOhFour from '../components/FourOhFour';
|
||||||
import Loader from '../components/helpers/loader';
|
import Loader from '../components/helpers/loader';
|
||||||
|
import Profile from '../components/profile/Profile';
|
||||||
import {
|
import {
|
||||||
userByNameSelector,
|
userByNameSelector,
|
||||||
userProfileFetchStateSelector,
|
userProfileFetchStateSelector,
|
||||||
fetchProfileForUser,
|
fetchProfileForUser,
|
||||||
usernameSelector
|
usernameSelector
|
||||||
} from '../redux';
|
} from '../redux';
|
||||||
import FourOhFour from '../components/FourOhFour';
|
|
||||||
import Profile from '../components/profile/Profile';
|
|
||||||
import { isBrowser } from '../../utils/index';
|
|
||||||
import { UserType } from '../redux/prop-types';
|
import { UserType } from '../redux/prop-types';
|
||||||
|
|
||||||
interface IShowProfileOrFourOhFourProps {
|
interface IShowProfileOrFourOhFourProps {
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
|
import { find, first } from 'lodash-es';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import '../components/layouts/project-links.css';
|
import '../components/layouts/project-links.css';
|
||||||
import { maybeUrlRE } from '../utils';
|
|
||||||
import { Spacer, Link } from '../components/helpers';
|
|
||||||
import {
|
|
||||||
projectMap,
|
|
||||||
legacyProjectMap
|
|
||||||
} from '../resources/cert-and-project-map';
|
|
||||||
import ProjectModal from '../components/SolutionViewer/ProjectModal';
|
|
||||||
import { find, first } from 'lodash-es';
|
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
|
import ProjectModal from '../components/SolutionViewer/ProjectModal';
|
||||||
|
import { Spacer, Link } from '../components/helpers';
|
||||||
import {
|
import {
|
||||||
ChallengeFileType,
|
ChallengeFileType,
|
||||||
CompletedChallenge,
|
CompletedChallenge,
|
||||||
UserType
|
UserType
|
||||||
} from '../redux/prop-types';
|
} from '../redux/prop-types';
|
||||||
|
import {
|
||||||
|
projectMap,
|
||||||
|
legacyProjectMap
|
||||||
|
} from '../resources/cert-and-project-map';
|
||||||
|
|
||||||
|
import { maybeUrlRE } from '../utils';
|
||||||
|
|
||||||
interface IShowProjectLinksProps {
|
interface IShowProjectLinksProps {
|
||||||
certName: string;
|
certName: string;
|
||||||
|
@ -1,30 +1,29 @@
|
|||||||
|
import { Grid } from '@freecodecamp/react-bootstrap';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import Helmet from 'react-helmet';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { Grid } from '@freecodecamp/react-bootstrap';
|
|
||||||
import Helmet from 'react-helmet';
|
|
||||||
|
|
||||||
import envData from '../../../config/env.json';
|
import envData from '../../../config/env.json';
|
||||||
|
import { createFlashMessage } from '../components/Flash/redux';
|
||||||
|
import { Loader, Spacer } from '../components/helpers';
|
||||||
|
import Certification from '../components/settings/Certification';
|
||||||
|
import About from '../components/settings/about';
|
||||||
|
import DangerZone from '../components/settings/danger-zone';
|
||||||
|
import Email from '../components/settings/email';
|
||||||
|
import Honesty from '../components/settings/honesty';
|
||||||
|
import Internet from '../components/settings/internet';
|
||||||
|
import Portfolio from '../components/settings/portfolio';
|
||||||
|
import Privacy from '../components/settings/privacy';
|
||||||
import {
|
import {
|
||||||
signInLoadingSelector,
|
signInLoadingSelector,
|
||||||
userSelector,
|
userSelector,
|
||||||
isSignedInSelector,
|
isSignedInSelector,
|
||||||
hardGoTo as navigate
|
hardGoTo as navigate
|
||||||
} from '../redux';
|
} from '../redux';
|
||||||
import { submitNewAbout, updateUserFlag, verifyCert } from '../redux/settings';
|
|
||||||
import { createFlashMessage } from '../components/Flash/redux';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
import { Loader, Spacer } from '../components/helpers';
|
|
||||||
import About from '../components/settings/about';
|
|
||||||
import Privacy from '../components/settings/privacy';
|
|
||||||
import Email from '../components/settings/email';
|
|
||||||
import Internet from '../components/settings/internet';
|
|
||||||
import Portfolio from '../components/settings/portfolio';
|
|
||||||
import Honesty from '../components/settings/honesty';
|
|
||||||
import Certification from '../components/settings/Certification';
|
|
||||||
import { UserType } from '../redux/prop-types';
|
import { UserType } from '../redux/prop-types';
|
||||||
import DangerZone from '../components/settings/danger-zone';
|
import { submitNewAbout, updateUserFlag, verifyCert } from '../redux/settings';
|
||||||
|
|
||||||
const { apiLocation } = envData;
|
const { apiLocation } = envData;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Grid, Panel, Button } from '@freecodecamp/react-bootstrap';
|
import { Grid, Panel, Button } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import envData from '../../../config/env.json';
|
import envData from '../../../config/env.json';
|
||||||
import FullWidthRow from '../components/helpers/full-width-row';
|
|
||||||
import { Spacer } from '../components/helpers';
|
import { Spacer } from '../components/helpers';
|
||||||
|
import FullWidthRow from '../components/helpers/full-width-row';
|
||||||
|
|
||||||
const { apiLocation } = envData;
|
const { apiLocation } = envData;
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
import React, { Component } from 'react';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import {
|
import {
|
||||||
Panel,
|
Panel,
|
||||||
FormControl,
|
FormControl,
|
||||||
@ -10,18 +7,21 @@ import {
|
|||||||
Col,
|
Col,
|
||||||
Row
|
Row
|
||||||
} from '@freecodecamp/react-bootstrap';
|
} from '@freecodecamp/react-bootstrap';
|
||||||
|
import React, { Component } from 'react';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
import { TFunction, Trans, withTranslation } from 'react-i18next';
|
import { TFunction, Trans, withTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import Login from '../components/Header/components/Login';
|
import Login from '../components/Header/components/Login';
|
||||||
|
|
||||||
|
import { Spacer, Loader, FullWidthRow } from '../components/helpers';
|
||||||
import {
|
import {
|
||||||
isSignedInSelector,
|
isSignedInSelector,
|
||||||
userFetchStateSelector,
|
userFetchStateSelector,
|
||||||
userSelector,
|
userSelector,
|
||||||
reportUser
|
reportUser
|
||||||
} from '../redux';
|
} from '../redux';
|
||||||
import { Spacer, Loader, FullWidthRow } from '../components/helpers';
|
|
||||||
|
|
||||||
interface IShowUserProps {
|
interface IShowUserProps {
|
||||||
email: string;
|
email: string;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import chai from 'chai';
|
import chai from 'chai';
|
||||||
import '@babel/polyfill';
|
import '@babel/polyfill';
|
||||||
import { toString as __toString } from 'lodash-es';
|
import { toString as __toString } from 'lodash-es';
|
||||||
import { format as __format } from '../../utils/format';
|
|
||||||
import curriculumHelpers, {
|
import curriculumHelpers, {
|
||||||
removeJSComments
|
removeJSComments
|
||||||
} from '../../utils/curriculum-helpers';
|
} from '../../utils/curriculum-helpers';
|
||||||
|
import { format as __format } from '../../utils/format';
|
||||||
|
|
||||||
const __utils = (() => {
|
const __utils = (() => {
|
||||||
const MAX_LOGS_SIZE = 64 * 1024;
|
const MAX_LOGS_SIZE = 64 * 1024;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Alert, Button } from '@freecodecamp/react-bootstrap';
|
import { Alert, Button } from '@freecodecamp/react-bootstrap';
|
||||||
import Spinner from 'react-spinkit';
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import Spinner from 'react-spinkit';
|
||||||
|
|
||||||
import './Donation.css';
|
import './Donation.css';
|
||||||
|
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
/* eslint-disable no-nested-ternary */
|
/* eslint-disable no-nested-ternary */
|
||||||
import React, { Component } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import {
|
import {
|
||||||
Col,
|
Col,
|
||||||
Row,
|
Row,
|
||||||
@ -11,7 +7,11 @@ import {
|
|||||||
ToggleButton,
|
ToggleButton,
|
||||||
ToggleButtonGroup
|
ToggleButtonGroup
|
||||||
} from '@freecodecamp/react-bootstrap';
|
} from '@freecodecamp/react-bootstrap';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
import { withTranslation } from 'react-i18next';
|
import { withTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
amountsConfig,
|
amountsConfig,
|
||||||
@ -20,9 +20,6 @@ import {
|
|||||||
defaultDonation,
|
defaultDonation,
|
||||||
modalDefaultDonation
|
modalDefaultDonation
|
||||||
} from '../../../../config/donation-settings';
|
} from '../../../../config/donation-settings';
|
||||||
import Spacer from '../helpers/spacer';
|
|
||||||
import PaypalButton from './PaypalButton';
|
|
||||||
import DonateCompletion from './DonateCompletion';
|
|
||||||
import {
|
import {
|
||||||
isSignedInSelector,
|
isSignedInSelector,
|
||||||
signInLoadingSelector,
|
signInLoadingSelector,
|
||||||
@ -32,6 +29,9 @@ import {
|
|||||||
defaultDonationFormState,
|
defaultDonationFormState,
|
||||||
userSelector
|
userSelector
|
||||||
} from '../../redux';
|
} from '../../redux';
|
||||||
|
import Spacer from '../helpers/spacer';
|
||||||
|
import DonateCompletion from './DonateCompletion';
|
||||||
|
import PaypalButton from './PaypalButton';
|
||||||
|
|
||||||
import './Donation.css';
|
import './Donation.css';
|
||||||
|
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
/* eslint-disable max-len */
|
/* eslint-disable max-len */
|
||||||
import React, { useEffect } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import { Modal, Button, Col, Row } from '@freecodecamp/react-bootstrap';
|
import { Modal, Button, Col, Row } from '@freecodecamp/react-bootstrap';
|
||||||
import { Spacer } from '../helpers';
|
import PropTypes from 'prop-types';
|
||||||
import Heart from '../../assets/icons/heart';
|
import React, { useEffect } from 'react';
|
||||||
import Cup from '../../assets/icons/cup';
|
|
||||||
import DonateForm from './DonateForm';
|
|
||||||
import { modalDefaultDonation } from '../../../../config/donation-settings';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
import { goToAnchor } from 'react-scrollable-anchor';
|
import { goToAnchor } from 'react-scrollable-anchor';
|
||||||
import { isLocationSuperBlock } from '../../utils/path-parsers';
|
import { bindActionCreators } from 'redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
import { modalDefaultDonation } from '../../../../config/donation-settings';
|
||||||
|
import Cup from '../../assets/icons/cup';
|
||||||
|
import Heart from '../../assets/icons/heart';
|
||||||
import {
|
import {
|
||||||
closeDonationModal,
|
closeDonationModal,
|
||||||
isDonationModalOpenSelector,
|
isDonationModalOpenSelector,
|
||||||
recentlyClaimedBlockSelector,
|
recentlyClaimedBlockSelector,
|
||||||
executeGA
|
executeGA
|
||||||
} from '../../redux';
|
} from '../../redux';
|
||||||
|
import { isLocationSuperBlock } from '../../utils/path-parsers';
|
||||||
|
import { Spacer } from '../helpers';
|
||||||
|
import DonateForm from './DonateForm';
|
||||||
|
|
||||||
import './Donation.css';
|
import './Donation.css';
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
|
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
|
|
||||||
import { scriptLoader, scriptRemover } from '../../utils/script-loaders';
|
|
||||||
import { Loader } from '../../components/helpers';
|
import { Loader } from '../../components/helpers';
|
||||||
|
import { scriptLoader, scriptRemover } from '../../utils/script-loaders';
|
||||||
|
|
||||||
export class PayPalButtonScriptLoader extends Component {
|
export class PayPalButtonScriptLoader extends Component {
|
||||||
state = { isSdkLoaded: window.paypal && true, isSubscription: true };
|
state = { isSdkLoaded: window.paypal && true, isSubscription: true };
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import { withTranslation } from 'react-i18next';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import PayPalButtonScriptLoader from './PayPalButtonScriptLoader';
|
|
||||||
import { withTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
import envData from '../../../../config/env.json';
|
|
||||||
import {
|
import {
|
||||||
paypalConfigurator,
|
paypalConfigurator,
|
||||||
paypalConfigTypes
|
paypalConfigTypes
|
||||||
} from '../../../../config/donation-settings';
|
} from '../../../../config/donation-settings';
|
||||||
|
import envData from '../../../../config/env.json';
|
||||||
import { signInLoadingSelector, userSelector } from '../../redux';
|
import { signInLoadingSelector, userSelector } from '../../redux';
|
||||||
|
import PayPalButtonScriptLoader from './PayPalButtonScriptLoader';
|
||||||
|
|
||||||
const { paypalClientId, deploymentEnv } = envData;
|
const { paypalClientId, deploymentEnv } = envData;
|
||||||
export class PaypalButton extends Component {
|
export class PaypalButton extends Component {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Alert } from '@freecodecamp/react-bootstrap';
|
import { Alert } from '@freecodecamp/react-bootstrap';
|
||||||
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { useState, useEffect } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
||||||
|
|
||||||
import './flash.css';
|
import './flash.css';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { createAction, handleActions } from 'redux-actions';
|
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
|
import { createAction, handleActions } from 'redux-actions';
|
||||||
|
|
||||||
import { createTypes } from '../../../utils/create-types';
|
import { createTypes } from '../../../utils/create-types';
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
import { Link } from 'gatsby';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
import { Spacer } from '../helpers';
|
|
||||||
import { Link } from 'gatsby';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import notFoundLogo from '../../assets/images/freeCodeCamp-404.svg';
|
import notFoundLogo from '../../assets/images/freeCodeCamp-404.svg';
|
||||||
import { randomQuote } from '../../utils/get-words';
|
import { randomQuote } from '../../utils/get-words';
|
||||||
|
import { Spacer } from '../helpers';
|
||||||
|
|
||||||
import './404.css';
|
import './404.css';
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { create } from 'react-test-renderer';
|
import { create } from 'react-test-renderer';
|
||||||
import ShallowRenderer from 'react-test-renderer/shallow';
|
import ShallowRenderer from 'react-test-renderer/shallow';
|
||||||
|
|
||||||
import { UniversalNav } from './components/universal-nav';
|
|
||||||
import { NavLinks } from './components/nav-links';
|
|
||||||
import AuthOrProfile from './components/auth-or-profile';
|
|
||||||
|
|
||||||
import envData from '../../../../config/env.json';
|
import envData from '../../../../config/env.json';
|
||||||
import { useTranslation } from 'react-i18next';
|
import AuthOrProfile from './components/auth-or-profile';
|
||||||
|
import { NavLinks } from './components/nav-links';
|
||||||
|
import { UniversalNav } from './components/universal-nav';
|
||||||
|
|
||||||
const { apiLocation } = envData;
|
const { apiLocation } = envData;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
import { Button } from '@freecodecamp/react-bootstrap';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import { Button } from '@freecodecamp/react-bootstrap';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
import { isSignedInSelector } from '../../../redux';
|
|
||||||
import envData from '../../../../../config/env.json';
|
import envData from '../../../../../config/env.json';
|
||||||
|
import { isSignedInSelector } from '../../../redux';
|
||||||
|
|
||||||
import './login.css';
|
import './login.css';
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link, AvatarRenderer } from '../../helpers';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Link, AvatarRenderer } from '../../helpers';
|
||||||
import Login from './Login';
|
import Login from './Login';
|
||||||
|
|
||||||
export interface AuthOrProfileProps {
|
export interface AuthOrProfileProps {
|
||||||
|
@ -8,10 +8,6 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import React, { Component, Fragment } from 'react';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { TFunction, withTranslation } from 'react-i18next';
|
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
||||||
import {
|
import {
|
||||||
faCheck,
|
faCheck,
|
||||||
faCheckSquare,
|
faCheckSquare,
|
||||||
@ -19,15 +15,19 @@ import {
|
|||||||
faSquare,
|
faSquare,
|
||||||
faExternalLinkAlt
|
faExternalLinkAlt
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
import { Link } from '../../helpers';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { updateUserFlag } from '../../../redux/settings';
|
import React, { Component, Fragment } from 'react';
|
||||||
|
import { TFunction, withTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
import envData from '../../../../../config/env.json';
|
import envData from '../../../../../config/env.json';
|
||||||
import createLanguageRedirect from '../../create-language-redirect';
|
|
||||||
import {
|
import {
|
||||||
availableLangs,
|
availableLangs,
|
||||||
i18nextCodes,
|
i18nextCodes,
|
||||||
langDisplayNames
|
langDisplayNames
|
||||||
} from '../../../../../config/i18n/all-langs';
|
} from '../../../../../config/i18n/all-langs';
|
||||||
|
import { updateUserFlag } from '../../../redux/settings';
|
||||||
|
import createLanguageRedirect from '../../create-language-redirect';
|
||||||
|
import { Link } from '../../helpers';
|
||||||
|
|
||||||
const { clientLocale, radioLocation, apiLocation } = envData;
|
const { clientLocale, radioLocation, apiLocation } = envData;
|
||||||
|
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||||
/* eslint-disable react/prop-types */
|
/* eslint-disable react/prop-types */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
import Loadable from '@loadable/component';
|
||||||
import React, { Ref } from 'react';
|
import React, { Ref } from 'react';
|
||||||
|
import { isLanding } from '../../../utils/path-parsers';
|
||||||
import { Link, SkeletonSprite } from '../../helpers';
|
import { Link, SkeletonSprite } from '../../helpers';
|
||||||
import NavLogo from './nav-logo';
|
|
||||||
import MenuButton from './menu-button';
|
import MenuButton from './menu-button';
|
||||||
import NavLinks from './nav-links';
|
import NavLinks from './nav-links';
|
||||||
|
import NavLogo from './nav-logo';
|
||||||
import './universal-nav.css';
|
import './universal-nav.css';
|
||||||
import { isLanding } from '../../../utils/path-parsers';
|
|
||||||
import Loadable from '@loadable/component';
|
|
||||||
|
|
||||||
const SearchBar = Loadable(() => import('../../search/searchBar/search-bar'));
|
const SearchBar = Loadable(() => import('../../search/searchBar/search-bar'));
|
||||||
const SearchBarOptimized = Loadable(
|
const SearchBarOptimized = Loadable(
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
import React from 'react';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import { Link } from 'gatsby';
|
import { Link } from 'gatsby';
|
||||||
import Spinner from 'react-spinkit';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import Spinner from 'react-spinkit';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import { isSignedInSelector, userFetchStateSelector } from '../../../redux';
|
import { isSignedInSelector, userFetchStateSelector } from '../../../redux';
|
||||||
import Login from './Login';
|
import Login from './Login';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import renderer from 'react-test-renderer';
|
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
import renderer from 'react-test-renderer';
|
||||||
import { createStore } from '../../redux/createStore';
|
import { createStore } from '../../redux/createStore';
|
||||||
|
|
||||||
import Intro from './';
|
import Intro from './';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link, Spacer } from '../../helpers';
|
|
||||||
import envData from '../../../../../config/env.json';
|
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
|
import envData from '../../../../../config/env.json';
|
||||||
|
import { Link, Spacer } from '../../helpers';
|
||||||
|
|
||||||
import '../intro.css';
|
import '../intro.css';
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link, Spacer, Loader, FullWidthRow } from '../helpers';
|
import React from 'react';
|
||||||
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
import { randomQuote } from '../../utils/get-words';
|
import { randomQuote } from '../../utils/get-words';
|
||||||
|
import Login from '../Header/components/Login';
|
||||||
|
import { Link, Spacer, Loader, FullWidthRow } from '../helpers';
|
||||||
import CurrentChallengeLink from '../helpers/current-challenge-link';
|
import CurrentChallengeLink from '../helpers/current-challenge-link';
|
||||||
import IntroDescription from './components/IntroDescription';
|
import IntroDescription from './components/IntroDescription';
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
import './intro.css';
|
import './intro.css';
|
||||||
import Login from '../Header/components/Login';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
complete: PropTypes.bool,
|
complete: PropTypes.bool,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
|
||||||
import { useStaticQuery } from 'gatsby';
|
|
||||||
import { render } from '@testing-library/react';
|
import { render } from '@testing-library/react';
|
||||||
|
import { useStaticQuery } from 'gatsby';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { Map } from './';
|
|
||||||
import mockChallengeNodes from '../../__mocks__/challenge-nodes';
|
import mockChallengeNodes from '../../__mocks__/challenge-nodes';
|
||||||
|
import { Map } from './';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
useStaticQuery.mockImplementationOnce(() => ({
|
useStaticQuery.mockImplementationOnce(() => ({
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { graphql, useStaticQuery } from 'gatsby';
|
import { graphql, useStaticQuery } from 'gatsby';
|
||||||
import i18next from 'i18next';
|
import i18next from 'i18next';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import envData from '../../../../config/env.json';
|
||||||
|
import { isAuditedCert } from '../../../../utils/is-audited';
|
||||||
import { generateIconComponent } from '../../assets/icons';
|
import { generateIconComponent } from '../../assets/icons';
|
||||||
|
|
||||||
import { Link, Spacer } from '../helpers';
|
|
||||||
import LinkButton from '../../assets/icons/link-button';
|
import LinkButton from '../../assets/icons/link-button';
|
||||||
|
import { Link, Spacer } from '../helpers';
|
||||||
import './map.css';
|
import './map.css';
|
||||||
import { isAuditedCert } from '../../../../utils/is-audited';
|
|
||||||
import envData from '../../../../config/env.json';
|
|
||||||
|
|
||||||
const { curriculumLocale } = envData;
|
const { curriculumLocale } = envData;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import SolutionViewer from './SolutionViewer';
|
|
||||||
import { Button, Modal } from '@freecodecamp/react-bootstrap';
|
import { Button, Modal } from '@freecodecamp/react-bootstrap';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import SolutionViewer from './SolutionViewer';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
files: PropTypes.arrayOf(
|
files: PropTypes.arrayOf(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Panel } from '@freecodecamp/react-bootstrap';
|
import { Panel } from '@freecodecamp/react-bootstrap';
|
||||||
import Prism from 'prismjs';
|
import Prism from 'prismjs';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
const prismLang = {
|
const prismLang = {
|
||||||
css: 'css',
|
css: 'css',
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
import { render, waitFor } from '@testing-library/react';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { I18nextProvider } from 'react-i18next';
|
import { I18nextProvider } from 'react-i18next';
|
||||||
import { render, waitFor } from '@testing-library/react';
|
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
|
||||||
import { i18nextCodes } from '../../../config/i18n/all-langs';
|
import { i18nextCodes } from '../../../config/i18n/all-langs';
|
||||||
import AppMountNotifier from './app-mount-notifier';
|
|
||||||
import { createStore } from '../redux/createStore';
|
|
||||||
import i18nTestConfig from '../../i18n/configForTests';
|
import i18nTestConfig from '../../i18n/configForTests';
|
||||||
|
import { createStore } from '../redux/createStore';
|
||||||
|
import AppMountNotifier from './app-mount-notifier';
|
||||||
|
|
||||||
jest.mock('react-ga');
|
jest.mock('react-ga');
|
||||||
jest.unmock('react-i18next');
|
jest.unmock('react-i18next');
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { bindActionCreators, Dispatch } from 'redux';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { bindActionCreators, Dispatch } from 'redux';
|
||||||
|
|
||||||
import { appMount } from '../redux';
|
import { appMount } from '../redux';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
import { Form } from 'react-final-form';
|
import { Form } from 'react-final-form';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { render, fireEvent, screen } from '@testing-library/react';
|
import { render, fireEvent, screen } from '@testing-library/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import Form from './Form';
|
import Form from './Form';
|
||||||
|
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
import React from 'react';
|
|
||||||
import { kebabCase } from 'lodash-es';
|
|
||||||
import normalizeUrl from 'normalize-url';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
Col,
|
Col,
|
||||||
@ -10,6 +6,10 @@ import {
|
|||||||
FormGroup,
|
FormGroup,
|
||||||
HelpBlock
|
HelpBlock
|
||||||
} from '@freecodecamp/react-bootstrap';
|
} from '@freecodecamp/react-bootstrap';
|
||||||
|
import { kebabCase } from 'lodash-es';
|
||||||
|
import normalizeUrl from 'normalize-url';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
import { Field } from 'react-final-form';
|
import { Field } from 'react-final-form';
|
||||||
import {
|
import {
|
||||||
editorValidator,
|
editorValidator,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { render, screen } from '@testing-library/react';
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import BlockSaveButton from './block-save-button';
|
import BlockSaveButton from './block-save-button';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Button } from '@freecodecamp/react-bootstrap';
|
import { Button } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
function BlockSaveButton(props?: Record<string, unknown>): JSX.Element {
|
function BlockSaveButton(props?: Record<string, unknown>): JSX.Element {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { render } from '@testing-library/react';
|
import { render } from '@testing-library/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import BlockSaveWrapper from './block-save-wrapper';
|
import BlockSaveWrapper from './block-save-wrapper';
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import { Image } from '@freecodecamp/react-bootstrap';
|
import { Image } from '@freecodecamp/react-bootstrap';
|
||||||
import DefaultAvatar from '../../assets/icons/default-avatar';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { defaultUserImage } from '../../../../config/misc';
|
|
||||||
import { borderColorPicker } from '.';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { defaultUserImage } from '../../../../config/misc';
|
||||||
|
import DefaultAvatar from '../../assets/icons/default-avatar';
|
||||||
|
import { borderColorPicker } from '.';
|
||||||
|
|
||||||
interface AvatarRendererProps {
|
interface AvatarRendererProps {
|
||||||
isDonating?: boolean;
|
isDonating?: boolean;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Button } from '@freecodecamp/react-bootstrap';
|
import { Button } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
function BlockSaveButton({
|
function BlockSaveButton({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Row, Col } from '@freecodecamp/react-bootstrap';
|
import { Row, Col } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
function FullWidthRow({
|
function FullWidthRow({
|
||||||
children,
|
children,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Link as GatsbyLink } from 'gatsby';
|
import { Link as GatsbyLink } from 'gatsby';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface LinkProps {
|
interface LinkProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { render, cleanup, screen } from '@testing-library/react';
|
import { render, cleanup, screen } from '@testing-library/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import Loader from './loader';
|
import Loader from './loader';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Row, Col } from '@freecodecamp/react-bootstrap';
|
import { Row, Col } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface SlimWidthRowProps {
|
interface SlimWidthRowProps {
|
||||||
children: JSX.ElementChildrenAttribute;
|
children: JSX.ElementChildrenAttribute;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React from 'react';
|
|
||||||
import {
|
import {
|
||||||
ToggleButtonGroup as BSBG,
|
ToggleButtonGroup as BSBG,
|
||||||
ToggleButton as TB
|
ToggleButton as TB
|
||||||
} from '@freecodecamp/react-bootstrap';
|
} from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import './toggle-button.css';
|
import './toggle-button.css';
|
||||||
import ToggleCheck from '../../assets/icons/toggle-check';
|
|
||||||
import Spacer from '../../assets/icons/spacer';
|
import Spacer from '../../assets/icons/spacer';
|
||||||
|
import ToggleCheck from '../../assets/icons/toggle-check';
|
||||||
|
|
||||||
interface ButtonProps {
|
interface ButtonProps {
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ShallowRenderer from 'react-test-renderer/shallow';
|
import ShallowRenderer from 'react-test-renderer/shallow';
|
||||||
|
|
||||||
import IndexPage from '../../pages';
|
|
||||||
import mockChallengeNodes from '../../__mocks__/challenge-nodes';
|
import mockChallengeNodes from '../../__mocks__/challenge-nodes';
|
||||||
|
import IndexPage from '../../pages';
|
||||||
|
|
||||||
jest.mock('../../analytics');
|
jest.mock('../../analytics');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
||||||
import { AsSeenInText } from '../../../assets/images/components';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { AsSeenInText } from '../../../assets/images/components';
|
||||||
|
|
||||||
const AsSeenIn = () => {
|
const AsSeenIn = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Login from '../../Header/components/Login';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import Login from '../../Header/components/Login';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
page: PropTypes.string
|
page: PropTypes.string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Media from 'react-responsive';
|
import React from 'react';
|
||||||
import { Spacer, ImageLoader } from '../../helpers';
|
|
||||||
import wideImg from '../../../assets/images/landing/wide-image.png';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import Media from 'react-responsive';
|
||||||
|
import wideImg from '../../../assets/images/landing/wide-image.png';
|
||||||
|
import { Spacer, ImageLoader } from '../../helpers';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
page: PropTypes.string
|
page: PropTypes.string
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
||||||
import { Spacer } from '../../helpers';
|
import PropTypes from 'prop-types';
|
||||||
import BigCallToAction from './BigCallToAction';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Map from '../../Map/index';
|
import Map from '../../Map/index';
|
||||||
|
import { Spacer } from '../../helpers';
|
||||||
|
import BigCallToAction from './BigCallToAction';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
page: PropTypes.string
|
page: PropTypes.string
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
||||||
import { Spacer } from '../../helpers';
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import {
|
import {
|
||||||
AmazonLogo,
|
AmazonLogo,
|
||||||
AppleLogo,
|
AppleLogo,
|
||||||
@ -9,9 +9,9 @@ import {
|
|||||||
SpotifyLogo,
|
SpotifyLogo,
|
||||||
GoogleLogo
|
GoogleLogo
|
||||||
} from '../../../assets/images/components';
|
} from '../../../assets/images/components';
|
||||||
import CampersImage from './CampersImage';
|
import { Spacer } from '../../helpers';
|
||||||
import BigCallToAction from './BigCallToAction';
|
import BigCallToAction from './BigCallToAction';
|
||||||
import { useTranslation } from 'react-i18next';
|
import CampersImage from './CampersImage';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
page: PropTypes.string
|
page: PropTypes.string
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import React from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { ImageLoader } from '../../helpers';
|
|
||||||
import shawnImg from '../../../assets/images/landing/Shawn.png';
|
|
||||||
import sarahImg from '../../../assets/images/landing/Sarah.png';
|
|
||||||
import emmaImg from '../../../assets/images/landing/Emma.png';
|
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
|
import emmaImg from '../../../assets/images/landing/Emma.png';
|
||||||
|
import sarahImg from '../../../assets/images/landing/Sarah.png';
|
||||||
|
import shawnImg from '../../../assets/images/landing/Shawn.png';
|
||||||
|
import { ImageLoader } from '../../helpers';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
page: PropTypes.string
|
page: PropTypes.string
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Grid } from '@freecodecamp/react-bootstrap';
|
import { Grid } from '@freecodecamp/react-bootstrap';
|
||||||
import Helmet from 'react-helmet';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import React from 'react';
|
||||||
|
import Helmet from 'react-helmet';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import Testimonials from './components/Testimonials';
|
|
||||||
import LandingTop from './components/LandingTop';
|
|
||||||
import Certifications from './components/Certifications';
|
|
||||||
import AsSeenIn from './components/AsSeenIn';
|
import AsSeenIn from './components/AsSeenIn';
|
||||||
|
import Certifications from './components/Certifications';
|
||||||
|
import LandingTop from './components/LandingTop';
|
||||||
|
import Testimonials from './components/Testimonials';
|
||||||
|
|
||||||
import './landing.css';
|
import './landing.css';
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React, { Component } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import Helmet from 'react-helmet';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
import { fetchUser, isSignedInSelector, executeGA } from '../../redux';
|
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import Helmet from 'react-helmet';
|
import { fetchUser, isSignedInSelector, executeGA } from '../../redux';
|
||||||
|
|
||||||
const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({
|
const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({
|
||||||
isSignedIn
|
isSignedIn
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
import React, { Component } from 'react';
|
import fontawesome from '@fortawesome/fontawesome';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import Helmet from 'react-helmet';
|
||||||
|
import { withTranslation } from 'react-i18next';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import Helmet from 'react-helmet';
|
|
||||||
import fontawesome from '@fortawesome/fontawesome';
|
|
||||||
import { withTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
|
import latoBoldURL from '../../../static/fonts/lato/Lato-Bold.woff';
|
||||||
|
import latoLightURL from '../../../static/fonts/lato/Lato-Light.woff';
|
||||||
|
import latoRegularURL from '../../../static/fonts/lato/Lato-Regular.woff';
|
||||||
|
import robotoBoldURL from '../../../static/fonts/roboto-mono/RobotoMono-Bold.woff';
|
||||||
|
import robotoItalicURL from '../../../static/fonts/roboto-mono/RobotoMono-Italic.woff';
|
||||||
|
import robotoRegularURL from '../../../static/fonts/roboto-mono/RobotoMono-Regular.woff';
|
||||||
|
import { isBrowser } from '../../../utils';
|
||||||
import {
|
import {
|
||||||
fetchUser,
|
fetchUser,
|
||||||
isSignedInSelector,
|
isSignedInSelector,
|
||||||
@ -17,24 +24,16 @@ import {
|
|||||||
usernameSelector,
|
usernameSelector,
|
||||||
executeGA
|
executeGA
|
||||||
} from '../../redux';
|
} from '../../redux';
|
||||||
|
import Flash from '../Flash';
|
||||||
import { flashMessageSelector, removeFlashMessage } from '../Flash/redux';
|
import { flashMessageSelector, removeFlashMessage } from '../Flash/redux';
|
||||||
|
|
||||||
import { isBrowser } from '../../../utils';
|
|
||||||
|
|
||||||
import OfflineWarning from '../OfflineWarning';
|
|
||||||
import Flash from '../Flash';
|
|
||||||
import Header from '../Header';
|
|
||||||
import Footer from '../Footer';
|
import Footer from '../Footer';
|
||||||
|
import Header from '../Header';
|
||||||
|
import OfflineWarning from '../OfflineWarning';
|
||||||
// preload common fonts
|
// preload common fonts
|
||||||
import latoLightURL from '../../../static/fonts/lato/Lato-Light.woff';
|
|
||||||
import latoRegularURL from '../../../static/fonts/lato/Lato-Regular.woff';
|
|
||||||
import latoBoldURL from '../../../static/fonts/lato/Lato-Bold.woff';
|
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
import robotoRegularURL from '../../../static/fonts/roboto-mono/RobotoMono-Regular.woff';
|
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
import robotoBoldURL from '../../../static/fonts/roboto-mono/RobotoMono-Bold.woff';
|
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
import robotoItalicURL from '../../../static/fonts/roboto-mono/RobotoMono-Italic.woff';
|
|
||||||
|
|
||||||
import './fonts.css';
|
import './fonts.css';
|
||||||
import './global.css';
|
import './global.css';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { Helmet } from 'react-helmet';
|
import { Helmet } from 'react-helmet';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
import { Loader } from '../../components/helpers';
|
import { Loader } from '../../components/helpers';
|
||||||
import {
|
import {
|
||||||
userSelector,
|
userSelector,
|
||||||
@ -9,8 +9,8 @@ import {
|
|||||||
isSignedInSelector,
|
isSignedInSelector,
|
||||||
tryToShowDonationModal
|
tryToShowDonationModal
|
||||||
} from '../../redux';
|
} from '../../redux';
|
||||||
import createRedirect from '../create-redirect';
|
|
||||||
import DonateModal from '../Donation/DonationModal';
|
import DonateModal from '../Donation/DonationModal';
|
||||||
|
import createRedirect from '../create-redirect';
|
||||||
|
|
||||||
import './prism.css';
|
import './prism.css';
|
||||||
import './prism-night.css';
|
import './prism-night.css';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { render, screen } from '@testing-library/react';
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import Profile from './Profile';
|
import Profile from './Profile';
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Grid, Row } from '@freecodecamp/react-bootstrap';
|
import { Grid, Row } from '@freecodecamp/react-bootstrap';
|
||||||
|
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 { CurrentChallengeLink, FullWidthRow, Link, Spacer } from '../helpers';
|
||||||
import Camper from './components/Camper';
|
import Camper from './components/Camper';
|
||||||
import HeatMap from './components/HeatMap';
|
|
||||||
import Certifications from './components/Certifications';
|
import Certifications from './components/Certifications';
|
||||||
|
import HeatMap from './components/HeatMap';
|
||||||
import Portfolio from './components/Portfolio';
|
import Portfolio from './components/Portfolio';
|
||||||
import Timeline from './components/TimeLine';
|
import Timeline from './components/TimeLine';
|
||||||
|
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
||||||
import {
|
import {
|
||||||
faAward,
|
faAward,
|
||||||
faCalendar,
|
faCalendar,
|
||||||
faHeart
|
faHeart
|
||||||
} from '@fortawesome/free-solid-svg-icons';
|
} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
import { TFunction, useTranslation } from 'react-i18next';
|
import { TFunction, useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
import envData from '../../../../../config/env.json';
|
||||||
|
import { langCodes } from '../../../../../config/i18n/all-langs';
|
||||||
import { AvatarRenderer } from '../../helpers';
|
import { AvatarRenderer } from '../../helpers';
|
||||||
import SocialIcons from './SocialIcons';
|
|
||||||
import Link from '../../helpers/link';
|
import Link from '../../helpers/link';
|
||||||
|
import SocialIcons from './SocialIcons';
|
||||||
|
|
||||||
import './camper.css';
|
import './camper.css';
|
||||||
|
|
||||||
import { langCodes } from '../../../../../config/i18n/all-langs';
|
|
||||||
import envData from '../../../../../config/env.json';
|
|
||||||
|
|
||||||
const { clientLocale } = envData;
|
const { clientLocale } = envData;
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React, { Fragment } from 'react';
|
|
||||||
import { curry } from 'lodash-es';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
import { Col, Row } from '@freecodecamp/react-bootstrap';
|
||||||
|
import { curry } from 'lodash-es';
|
||||||
|
import React, { Fragment } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import { certificatesByNameSelector } from '../../../redux';
|
import { certificatesByNameSelector } from '../../../redux';
|
||||||
import { ButtonSpacer, FullWidthRow, Link, Spacer } from '../../helpers';
|
import { ButtonSpacer, FullWidthRow, Link, Spacer } from '../../helpers';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { render, screen } from '@testing-library/react';
|
import { render, screen } from '@testing-library/react';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import HeatMap from './HeatMap';
|
import HeatMap from './HeatMap';
|
||||||
|
|
||||||
|
@ -1,25 +1,24 @@
|
|||||||
import React, { Component } from 'react';
|
import { Row } from '@freecodecamp/react-bootstrap';
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import CalendarHeatMap from '@freecodecamp/react-calendar-heatmap';
|
import CalendarHeatMap from '@freecodecamp/react-calendar-heatmap';
|
||||||
import { Row } from '@freecodecamp/react-bootstrap';
|
|
||||||
import ReactTooltip from 'react-tooltip';
|
|
||||||
import addDays from 'date-fns/addDays';
|
import addDays from 'date-fns/addDays';
|
||||||
import addMonths from 'date-fns/addMonths';
|
import addMonths from 'date-fns/addMonths';
|
||||||
import startOfDay from 'date-fns/startOfDay';
|
|
||||||
import isEqual from 'date-fns/isEqual';
|
import isEqual from 'date-fns/isEqual';
|
||||||
|
import startOfDay from 'date-fns/startOfDay';
|
||||||
|
import React, { Component } from 'react';
|
||||||
import { TFunction, useTranslation } from 'react-i18next';
|
import { TFunction, useTranslation } from 'react-i18next';
|
||||||
|
import ReactTooltip from 'react-tooltip';
|
||||||
import FullWidthRow from '../../helpers/full-width-row';
|
|
||||||
import Spacer from '../../helpers/spacer';
|
|
||||||
|
|
||||||
import '@freecodecamp/react-calendar-heatmap/dist/styles.css';
|
import '@freecodecamp/react-calendar-heatmap/dist/styles.css';
|
||||||
import './heatmap.css';
|
import './heatmap.css';
|
||||||
|
|
||||||
import { langCodes } from '../../../../../config/i18n/all-langs';
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import envData from '../../../../../config/env.json';
|
import envData from '../../../../../config/env.json';
|
||||||
|
import { langCodes } from '../../../../../config/i18n/all-langs';
|
||||||
|
import FullWidthRow from '../../helpers/full-width-row';
|
||||||
|
import Spacer from '../../helpers/spacer';
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
const { clientLocale } = envData;
|
const { clientLocale } = envData;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Media } from '@freecodecamp/react-bootstrap';
|
import { Media } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { FullWidthRow } from '../../helpers';
|
import { FullWidthRow } from '../../helpers';
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Row, Col } from '@freecodecamp/react-bootstrap';
|
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
||||||
import {
|
import {
|
||||||
faLinkedin,
|
faLinkedin,
|
||||||
faGithub,
|
faGithub,
|
||||||
faTwitter
|
faTwitter
|
||||||
} from '@fortawesome/free-brands-svg-icons';
|
} from '@fortawesome/free-brands-svg-icons';
|
||||||
import { faLink } from '@fortawesome/free-solid-svg-icons';
|
import { faLink } from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
import { Row, Col } from '@freecodecamp/react-bootstrap';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import './social-icons.css';
|
import './social-icons.css';
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user