Remove redundant comment in AppealDiscord and enhance state handling in SentComponent.
This commit is contained in:
1 parent
4962d16abd
commit
1f1f1793e3
2 files changed
+4
-5
No files matched your search
@@ -16,11 +16,11 @@ export class SentComponent implements OnInit {
|
||||
private router: Router = inject(Router)
|
||||
|
||||
ngOnInit() {
|
||||
const navigation = this.router.getCurrentNavigation();
|
||||
const state = navigation?.extras.state as { message: string };
|
||||
const state = this.router.getCurrentNavigation()?.extras.state || history.state;
|
||||
|
||||
if (state?.message) {
|
||||
this.message = state.message;
|
||||
if (state && 'message' in state) {
|
||||
this.message = state.message as string;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user