@@ -16,7 +16,7 @@ import { ParseBreaksPipe, ParseLinksPipe } from "@corelib";
1616import { ButtonComponent } from "@ui/components" ;
1717import { AvatarComponent , IconComponent } from "@uilib" ;
1818import { expandElement } from "@utils/expand-element" ;
19- import { map , Subscription } from "rxjs" ;
19+ import { map , Observable , Subscription } from "rxjs" ;
2020import { SkillCardComponent } from "../../../../skills/shared/skill-card/skill-card.component" ;
2121import { CommonModule } from "@angular/common" ;
2222import { MonthBlockComponent } from "projects/skills/src/app/profile/shared/month-block/month-block.component" ;
@@ -29,6 +29,7 @@ import { TrajectoriesService } from "../../../trajectories.service";
2929import { Month , UserData } from "projects/skills/src/models/profile.model" ;
3030import { ProfileService } from "projects/skills/src/app/profile/services/profile.service" ;
3131import { SkillService } from "projects/skills/src/app/skills/services/skill.service" ;
32+ import { BreakpointObserver } from "@angular/cdk/layout" ;
3233
3334@Component ( {
3435 selector : "app-detail" ,
@@ -56,6 +57,7 @@ export class TrajectoryInfoComponent implements OnInit, AfterViewInit {
5657 trajectoryService = inject ( TrajectoriesService ) ;
5758 profileService = inject ( ProfileService ) ;
5859 skillService = inject ( SkillService ) ;
60+ breakpointObserver = inject ( BreakpointObserver ) ;
5961
6062 subscriptions$ : Subscription [ ] = [ ] ;
6163
@@ -78,7 +80,13 @@ export class TrajectoryInfoComponent implements OnInit, AfterViewInit {
7880
7981 @ViewChild ( "descEl" ) descEl ?: ElementRef ;
8082
83+ desktopMode$ : Observable < boolean > = this . breakpointObserver
84+ . observe ( "(min-width: 920px)" )
85+ . pipe ( map ( result => result . matches ) ) ;
86+
8187 ngOnInit ( ) : void {
88+ this . desktopMode$ . subscribe ( r => console . log ( r ) ) ;
89+
8290 this . route . data . pipe ( map ( r => r [ "data" ] ) ) . subscribe ( r => {
8391 this . trajectory = r [ 0 ] ;
8492 this . userTrajectory . set ( { ...r [ 1 ] , individualSkills : r [ 2 ] } ) ;
0 commit comments