diff --git a/apps/tutorial/app/components/selection.gts b/apps/tutorial/app/components/selection.gts index ddc9a206f..88b38b2ba 100644 --- a/apps/tutorial/app/components/selection.gts +++ b/apps/tutorial/app/components/selection.gts @@ -6,7 +6,7 @@ import { service } from '@ember/service'; import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon'; import { faBars } from '@fortawesome/free-solid-svg-icons'; import { isCollection } from 'kolay'; -import { isNotHidden, titleize } from 'tutorial/utils'; +import { isNotHidden, lessonPath, titleize } from 'tutorial/utils'; import type RouterService from '@ember/routing/router-service'; import type DocsService from 'tutorial/services/docs'; @@ -32,10 +32,8 @@ export class Selection extends Component { this.router.transitionTo(event.target.value); }; - isSelected = (group: { path: string }, tutorial: { path: string }) => { - const fullPath = `/${group.path}/${tutorial.path}`; - - return this.docs.currentPath === fullPath; + isSelected = (tutorial: Parameters[0]) => { + return this.docs.currentPath === lessonPath(tutorial); };