Improve 404 navigation and styling

This commit is contained in:
shamoon
2023-08-08 23:59:13 -07:00
parent f6dadd8c82
commit 9291c98189
16 changed files with 160 additions and 74 deletions

View File

@@ -53,6 +53,6 @@ describe('DocumentAsnComponent', () => {
.mockReturnValue(of(convertToParamMap({ id: '5578' })))
const navigateSpy = jest.spyOn(router, 'navigate')
component.ngOnInit()
expect(navigateSpy).toHaveBeenCalledWith(['404'])
expect(navigateSpy).toHaveBeenCalledWith(['404'], { replaceUrl: true })
})
})

View File

@@ -25,7 +25,9 @@ export class DocumentAsnComponent implements OnInit {
if (documentId.length == 1) {
this.router.navigate(['documents', documentId[0]])
} else {
this.router.navigate(['404'])
this.router.navigate(['404'], {
replaceUrl: true,
})
}
})
})