1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

All Clients - Route data typing clean up (#11265)

This commit is contained in:
Jared Snider
2024-09-30 13:51:31 -04:00
committed by GitHub
parent a11c627687
commit ffc97c385d
4 changed files with 141 additions and 104 deletions

View File

@@ -43,6 +43,14 @@ import { VaultComponent } from "../vault/app/vault/vault.component";
import { SendComponent } from "./tools/send/send.component";
/**
* Data properties acceptable for use in route objects in the desktop
*/
export interface RouteDataProperties {
// For any new route data properties, add them here.
// then assert that the data object satisfies this interface in the route object.
}
const routes: Routes = [
{
path: "",
@@ -114,7 +122,6 @@ const routes: Routes = [
path: "remove-password",
component: RemovePasswordComponent,
canActivate: [authGuard],
data: { titleId: "removeMasterPassword" },
},
...unauthUiRefreshSwap(
HintComponent,
@@ -122,10 +129,6 @@ const routes: Routes = [
{
path: "hint",
canActivate: [unauthGuardFn()],
data: {
pageTitle: "passwordHint",
titleId: "passwordHint",
},
},
{
path: "",
@@ -137,8 +140,7 @@ const routes: Routes = [
pageTitle: "requestPasswordHint",
pageSubtitle: "enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou",
pageIcon: UserLockIcon,
state: "hint",
},
} satisfies AnonLayoutWrapperData,
children: [
{ path: "", component: PasswordHintComponent },
{