import { inject } from '@angular/core';
import { ResolveFn } from '@angular/router';
import { take } from 'rxjs/operators';

import { JumpsPageData } from '@models';
import { PagesService } from '@services';

export const jumpsPageResolver: ResolveFn<JumpsPageData> = () => {
    return inject(PagesService).getJumpsPage().pipe(take(1));
};