feat(client): ts-migrate client/src/resources/certAndProjectMap.js (#42648)
Co-authored-by: Parth Parth <thecodingaviator@users.noreply.github.com>pull/42624/head
parent
b334031b2f
commit
6b52d6c331
|
@ -20,7 +20,7 @@ import {
|
|||
userByNameSelector,
|
||||
fetchProfileForUser
|
||||
} from '../redux';
|
||||
import { certMap } from '../resources/certAndProjectMap';
|
||||
import { certMap } from '../resources/cert-and-project-map';
|
||||
import { createFlashMessage } from '../components/Flash/redux';
|
||||
import standardErrorMessage from '../utils/standardErrorMessage';
|
||||
import reallyWeirdErrorMessage from '../utils/reallyWeirdErrorMessage';
|
||||
|
|
|
@ -2,7 +2,10 @@ import React, { useState } from 'react';
|
|||
import '../components/layouts/project-links.css';
|
||||
import { maybeUrlRE } from '../utils';
|
||||
import { Spacer, Link } from '../components/helpers';
|
||||
import { projectMap, legacyProjectMap } from '../resources/certAndProjectMap';
|
||||
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';
|
||||
|
|
|
@ -14,7 +14,7 @@ import { withTranslation } from 'react-i18next';
|
|||
import {
|
||||
projectMap,
|
||||
legacyProjectMap
|
||||
} from '../../resources/certAndProjectMap';
|
||||
} from '../../resources/cert-and-project-map';
|
||||
|
||||
import SectionHeader from './section-header';
|
||||
import ProjectModal from '../SolutionViewer/ProjectModal';
|
||||
|
|
|
@ -440,7 +440,7 @@ const certMap = [
|
|||
{
|
||||
id: '606243f50267e718b1e755f4',
|
||||
title: 'Relational Databases',
|
||||
slug: 'relational-databases',
|
||||
certSlug: 'relational-databases',
|
||||
flag: 'isRelationalDatabasesCert',
|
||||
projects: [
|
||||
{
|
||||
|
@ -704,10 +704,12 @@ const certMap = [
|
|||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
] as const;
|
||||
|
||||
const legacyProjectMap = {};
|
||||
const projectMap = {};
|
||||
const titles = certMap.map(({ title }) => title);
|
||||
type Title = typeof titles[number];
|
||||
const legacyProjectMap: Partial<Record<Title, unknown>> = {};
|
||||
const projectMap: Partial<Record<Title, unknown>> = {};
|
||||
|
||||
certMap.forEach(cert => {
|
||||
// Filter out Legacy Full Stack so inputs for project
|
|
@ -10,7 +10,7 @@ import GreenPass from '../../../assets/icons/green-pass';
|
|||
import GreenNotCompleted from '../../../assets/icons/green-not-completed';
|
||||
import { certificatesByNameSelector } from '../../../redux';
|
||||
import { CurrentCertsType, User } from '../../../redux/prop-types';
|
||||
import { certMap } from '../../../resources/certAndProjectMap';
|
||||
import { certMap } from '../../../resources/cert-and-project-map';
|
||||
import {
|
||||
certSlugTypeMap,
|
||||
superBlockCertTypeMap
|
||||
|
|
Loading…
Reference in New Issue