mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(tools,client): remove head and tail logic (#66524)
This commit is contained in:
@@ -97,8 +97,6 @@ function formatChallengeData({
|
||||
name: 'script',
|
||||
ext: 'js',
|
||||
contents: javascript.challengeFiles[0].contents,
|
||||
head: '',
|
||||
tail: '',
|
||||
path: '',
|
||||
history: ['script.js'],
|
||||
fileKey: 'scriptjs'
|
||||
@@ -123,9 +121,7 @@ function formatChallengeData({
|
||||
ext: 'py',
|
||||
name: 'main',
|
||||
contents: python.challengeFiles[0].contents,
|
||||
head: '',
|
||||
path: '',
|
||||
tail: '',
|
||||
editableRegionBoundaries: [],
|
||||
history: ['main.py']
|
||||
}
|
||||
|
||||
@@ -211,7 +211,6 @@ export type ChallengeNode = {
|
||||
fields: Fields;
|
||||
fillInTheBlank: FillInTheBlank;
|
||||
forumTopicId: number;
|
||||
head: string[];
|
||||
hasEditableBoundaries: boolean;
|
||||
helpCategory: string;
|
||||
hooks?: Hooks;
|
||||
@@ -245,7 +244,6 @@ export type ChallengeNode = {
|
||||
sourceInstanceName: string;
|
||||
superOrder: number;
|
||||
superBlock: SuperBlocks;
|
||||
tail: string[];
|
||||
template: string;
|
||||
tests: Test[];
|
||||
title: string;
|
||||
@@ -548,11 +546,9 @@ export type ExperienceData = {
|
||||
export type FileKeyChallenge = {
|
||||
contents: string;
|
||||
ext: Ext;
|
||||
head: string;
|
||||
id: string;
|
||||
key: string;
|
||||
name: string;
|
||||
tail: string;
|
||||
};
|
||||
|
||||
export type ChallengeFiles = ChallengeFile[] | null;
|
||||
|
||||
@@ -10,8 +10,6 @@ const jsChallenge = {
|
||||
fileKey: 'jsFileKey',
|
||||
name: 'name',
|
||||
ext: 'js' as const,
|
||||
head: 'head',
|
||||
tail: 'tail',
|
||||
history: [],
|
||||
seed: 'original js contents',
|
||||
path: 'index.js'
|
||||
@@ -22,8 +20,6 @@ const cssChallenge = {
|
||||
fileKey: 'cssFileKey',
|
||||
name: 'name',
|
||||
ext: 'css' as const,
|
||||
head: 'head',
|
||||
tail: 'tail',
|
||||
history: [],
|
||||
seed: 'original css contents',
|
||||
path: 'styles.css'
|
||||
@@ -34,8 +30,6 @@ const htmlChallenge = {
|
||||
fileKey: 'htmlFileKey',
|
||||
name: 'name',
|
||||
ext: 'html' as const,
|
||||
head: 'head',
|
||||
tail: 'tail',
|
||||
history: [],
|
||||
seed: 'original html contents',
|
||||
path: 'index.html'
|
||||
|
||||
@@ -39,7 +39,6 @@ const defaultProps = {
|
||||
fields: {} as Fields,
|
||||
forumTopicId: 12345,
|
||||
guideUrl: 'https://mockurl.com',
|
||||
head: ['mockHead'],
|
||||
hasEditableBoundaries: false,
|
||||
helpCategory: 'mockHelpCategory',
|
||||
id: 'mockId',
|
||||
@@ -70,7 +69,6 @@ const defaultProps = {
|
||||
sourceInstanceName: 'mockSourceInstanceName',
|
||||
superOrder: 1,
|
||||
superBlock: SuperBlocks.FullStackDeveloperV9,
|
||||
tail: ['mockTail'],
|
||||
template: 'mockTemplate',
|
||||
tests: [] as Test[],
|
||||
title: 'mockTitle',
|
||||
|
||||
Reference in New Issue
Block a user