awslabs / threat-composer

A simple threat modeling tool to help humans to reduce time-to-value when threat modeling
https://awslabs.github.io/threat-composer/
Apache License 2.0
409 stars 40 forks source link

fix: Fix workspace urls to allow direct navigations to the workspace relative pages #119

Closed jessieweiyi closed 3 weeks ago

jessieweiyi commented 3 weeks ago

Issue #, if available:

Description of changes:

Refactor the routing mechanisms to use Data API powered create*Router to support more flexible routing.

The usage of Data API routing also enables usages of usePrompt to prompt users for confirmation via [window.confirm] prior to navigating away from the current location if there is any editing in place.

The routing logic:

The routing changes apply to with base_name (for instance, /threat-composer for Github deployment), without base_name (Self deployment), and IDE extension mode.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

github-actions[bot] commented 3 weeks ago

:tada: This PR is included in version 1.0.48 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: