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

import { Jump } from '@models';
import { JumpsService } from '@services';

export const jumpsResolver: ResolveFn<Array<Jump>> = () => {
    return inject(JumpsService).getAll().pipe(take(1));
};