Skip to content

Commit 4f4169f

Browse files
committed
fix: auth redirect
1 parent e304b66 commit 4f4169f

File tree

6 files changed

+69
-3
lines changed

6 files changed

+69
-3
lines changed

apps/devmx/src/app/app.routes.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Route } from '@angular/router';
2+
import { NotFoundContainer } from './containers';
23

34
export const appRoutes: Route[] = [
45
{
@@ -28,5 +29,9 @@ export const appRoutes: Route[] = [
2829
import('@devmx/account-feature-shell').then(
2930
(m) => m.accountFeatureShellRoutes
3031
),
31-
}
32+
},
33+
{
34+
path: '**',
35+
component: NotFoundContainer,
36+
},
3237
];
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './not-found.container';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
:host {
2+
height: 100vh;
3+
display: flex;
4+
flex-direction: column;
5+
6+
div {
7+
flex: 1;
8+
gap: 2em;
9+
display: flex;
10+
flex-direction: column;
11+
justify-content: space-around;
12+
align-items: center;
13+
}
14+
15+
h2 {
16+
font-size: 4.04em;
17+
text-align: center;
18+
font-weight: 600;
19+
}
20+
21+
h3 {
22+
text-align: center;
23+
}
24+
25+
a {
26+
display: flex;
27+
justify-content: center;
28+
color: blue;
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ChangeDetectionStrategy, Component } from '@angular/core';
2+
import { RouterLink } from '@angular/router';
3+
4+
@Component({
5+
selector: 'devmx-not-found',
6+
template: `
7+
<div>
8+
<img src="devmx.svg" />
9+
10+
<main>
11+
<h2>404</h2>
12+
<h3>Página não encontrada</h3>
13+
<a routerLink="/conta">Acesse sua conta</a>
14+
</main>
15+
16+
<img src="devpr.svg" width="100" />
17+
18+
</div>
19+
`,
20+
styleUrl: './not-found.container.scss',
21+
changeDetection: ChangeDetectionStrategy.OnPush,
22+
imports: [RouterLink],
23+
standalone: true,
24+
})
25+
export class NotFoundContainer {}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { AccountFeatureAuthComponent } from './account-feature-auth.component';
2-
import { provideAuth } from '@devmx/account-data-access';
2+
import { provideAccount } from '@devmx/account-data-access';
33
import { Route } from '@angular/router';
44

55
export const accountFeatureAuthRoutes: Route[] = [
66
{
77
path: '',
8-
providers: [provideAuth()],
8+
providers: [provideAccount()],
99
component: AccountFeatureAuthComponent,
1010
},
1111
];

packages/account/feature-shell/src/lib/account-feature-shell.routes.ts

+5
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,9 @@ export const accountFeatureShellRoutes: Route[] = [
126126
},
127127
],
128128
},
129+
{
130+
path: '',
131+
pathMatch: 'full',
132+
redirectTo: 'conta',
133+
},
129134
];

0 commit comments

Comments
 (0)