diff --git a/teachertool/src/constants.ts b/teachertool/src/constants.ts index b225308084a4..3e9287dee58a 100644 --- a/teachertool/src/constants.ts +++ b/teachertool/src/constants.ts @@ -2,6 +2,8 @@ export namespace Strings { export const ConfirmReplaceRubric = lf("This will replace your current rubric. Continue?"); + export const UntitledProject = lf("Untitled Project"); + export const UntitledRubric = lf("Untitled Rubric"); } namespace Constants { diff --git a/teachertool/src/state/helpers.ts b/teachertool/src/state/helpers.ts index 94c58993973e..c332620da6c9 100644 --- a/teachertool/src/state/helpers.ts +++ b/teachertool/src/state/helpers.ts @@ -4,6 +4,7 @@ import { ErrorCode } from "../types/errorCode"; import { Rubric } from "../types/rubric"; import { stateAndDispatch } from "./appStateContext"; import { AppState } from "./state"; +import { Strings } from "../constants"; export function getCatalogCriteriaWithId(id: string): CatalogCriteria | undefined { const { state } = stateAndDispatch(); @@ -53,12 +54,12 @@ export function isRubricLoaded(state: AppState): boolean { export function getSafeProjectName(state: AppState): string | undefined { if (state.projectMetadata) { - return state.projectMetadata.name ?? lf("Untitled Project"); + return state.projectMetadata.name ?? Strings.UntitledProject; } } export function getSafeRubricName(state: AppState): string | undefined { - return state.rubric.name || lf("Untitled Rubric"); + return state.rubric.name || Strings.UntitledRubric; } export function getSelectableCatalogCriteria(state: AppState): CatalogCriteria[] {