diff --git a/client/src/templates/Challenges/classic/DesktopLayout.js b/client/src/templates/Challenges/classic/DesktopLayout.js index 514989ab06..e1e11e2b22 100644 --- a/client/src/templates/Challenges/classic/DesktopLayout.js +++ b/client/src/templates/Challenges/classic/DesktopLayout.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { ReflexContainer, ReflexSplitter, ReflexElement } from 'react-reflex'; import envData from '../../../../../config/env.json'; -import { toSortedArray } from '../../../../../utils/sort-files'; +import { sortChallengeFiles } from '../../../../../utils/sort-challengefiles'; import EditorTabs from './EditorTabs'; import ActionRow from './action-row.tsx'; @@ -57,7 +57,7 @@ class DesktopLayout extends Component { getChallengeFile() { const { challengeFiles } = this.props; - return first(toSortedArray(challengeFiles)); + return first(sortChallengeFiles(challengeFiles)); } render() { diff --git a/client/src/templates/Challenges/classic/EditorTabs.js b/client/src/templates/Challenges/classic/EditorTabs.js index 98318a666a..c7cd10671d 100644 --- a/client/src/templates/Challenges/classic/EditorTabs.js +++ b/client/src/templates/Challenges/classic/EditorTabs.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { toSortedArray } from '../../../../../utils/sort-files'; +import { sortChallengeFiles } from '../../../../../utils/sort-challengefiles'; import { toggleVisibleEditor, visibleEditorsSelector, @@ -39,7 +39,7 @@ class EditorTabs extends Component { const { challengeFiles, toggleVisibleEditor, visibleEditors } = this.props; return (