Improve 404 navigation and styling

This commit is contained in:
shamoon
2023-08-08 23:59:13 -07:00
parent 4fdc82d126
commit 11b9347763
16 changed files with 160 additions and 74 deletions

View File

@@ -259,7 +259,7 @@ describe('DocumentListComponent', () => {
.mockReturnValue(of(convertToParamMap({ id: '10' })))
const navigateSpy = jest.spyOn(router, 'navigate')
fixture.detectChanges()
expect(navigateSpy).toHaveBeenCalledWith(['404'])
expect(navigateSpy).toHaveBeenCalledWith(['404'], { replaceUrl: true })
})
it('should load saved view from query params', () => {

View File

@@ -153,7 +153,9 @@ export class DocumentListComponent
.pipe(takeUntil(this.unsubscribeNotifier))
.subscribe(({ view }) => {
if (!view) {
this.router.navigate(['404'])
this.router.navigate(['404'], {
replaceUrl: true,
})
return
}
this.unmodifiedSavedView = view