From 280b4167e5123136f736b6a679bbf5f5bebb1430 Mon Sep 17 00:00:00 2001 From: thsparks Date: Tue, 7 May 2024 14:00:43 -0700 Subject: [PATCH] Use lf and constant for default category --- teachertool/src/constants.ts | 1 + teachertool/src/transforms/loadCatalogAsync.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/teachertool/src/constants.ts b/teachertool/src/constants.ts index ea7a9f264721..cc502c2a006f 100644 --- a/teachertool/src/constants.ts +++ b/teachertool/src/constants.ts @@ -33,6 +33,7 @@ export namespace Strings { export const Checklist = lf("Checklist"); export const Home = lf("Home"); export const CreateEmptyChecklist = lf("Create Empty Checklist"); + export const Other = lf("Other"); } export namespace Ticks { diff --git a/teachertool/src/transforms/loadCatalogAsync.ts b/teachertool/src/transforms/loadCatalogAsync.ts index 8fb5bc0cffae..607f73e72452 100644 --- a/teachertool/src/transforms/loadCatalogAsync.ts +++ b/teachertool/src/transforms/loadCatalogAsync.ts @@ -1,3 +1,4 @@ +import { Strings } from "../constants"; import { loadTestableCollectionFromDocsAsync } from "../services/backendRequests"; import { stateAndDispatch } from "../state"; import * as Actions from "../state/actions"; @@ -20,7 +21,7 @@ export async function loadCatalogAsync() { // Add default tag if none are present if (!c.tags || c.tags.length === 0) { - c.tags = ["Other"]; + c.tags = [Strings.Other]; } });