feat(client): move legacy rwd button to bottom of map (#47596)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Closes https://github.com/freeCodeCamp/freeCodeCamp/issues/46523
This commit is contained in:
Tom
2022-11-08 09:30:46 -06:00
committed by GitHub
parent e9240196e8
commit 5f73773cd4
20 changed files with 1236 additions and 1074 deletions
+7 -3
View File
@@ -2,7 +2,7 @@ import { spawn } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import { availableLangs } from '../../../config/i18n';
import { availableLangs, Languages } from '../../../config/i18n';
import env from '../../../config/read-env';
const globalConfigPath = path.resolve(__dirname, '../../../config');
@@ -11,7 +11,7 @@ const { FREECODECAMP_NODE_ENV } = process.env;
function checkClientLocale() {
if (!process.env.CLIENT_LOCALE) throw Error('CLIENT_LOCALE is not set');
if (!availableLangs.client.includes(process.env.CLIENT_LOCALE)) {
if (!availableLangs.client.includes(process.env.CLIENT_LOCALE as Languages)) {
throw Error(`
CLIENT_LOCALE, ${process.env.CLIENT_LOCALE}, is not an available language in config/i18n.ts
@@ -23,7 +23,11 @@ function checkClientLocale() {
function checkCurriculumLocale() {
if (!process.env.CURRICULUM_LOCALE)
throw Error('CURRICULUM_LOCALE is not set');
if (!availableLangs.curriculum.includes(process.env.CURRICULUM_LOCALE)) {
if (
!availableLangs.curriculum.includes(
process.env.CURRICULUM_LOCALE as Languages
)
) {
throw Error(`
CURRICULUM_LOCALE, ${process.env.CURRICULUM_LOCALE}, is not an available language in config/i18n.ts