import type { Url } from '@tinkoff/url' ; import { ClientRouter } from './client' ; import type { Navigation } from '../types' ; const omitHash = ( url ) => url . href . replace ( /#.*$/ , '' ) ; export class NoSpaRouter extends ClientRouter { protected run ( navigation ) { const { type , fromUrl , url } = navigation ; if ( type === 'updateCurrentRoute' || omitHash ( url ) === omitHash ( fromUrl ) ) { return super . run ( navigation ) ; } return this . notfound ( navigation ) ; } protected async runHooks ( ) { } }