14 lines
381 B
TypeScript
14 lines
381 B
TypeScript
import type { CourseSession } from "@/types";
|
|
|
|
export function assertUnreachable(msg: string): never {
|
|
throw new Error("Didn't expect to get here, " + msg);
|
|
}
|
|
|
|
export function getCompetenceBaseUrl(courseSession: CourseSession): string {
|
|
return courseSession.competence_url.replace(
|
|
// TODO: remove the `competence_url` with url to Navi...
|
|
"/competences",
|
|
""
|
|
);
|
|
}
|