@@ -9,11 +9,13 @@ import {
9
9
closeAlertMixin ,
10
10
} from 'src/components' ;
11
11
import { AppContext } from 'src/loaders/app-context' ;
12
+ import { Paths , formatPath } from 'src/paths' ;
12
13
import { RouteProps , withRouter } from 'src/utilities' ;
13
14
import './landing-page.scss' ;
14
15
15
16
interface IState {
16
17
alerts : AlertType [ ] ;
18
+ redirect : boolean ;
17
19
}
18
20
19
21
export class LandingPage extends React . Component < RouteProps , IState > {
@@ -22,11 +24,24 @@ export class LandingPage extends React.Component<RouteProps, IState> {
22
24
23
25
this . state = {
24
26
alerts : [ ] ,
27
+ redirect : false ,
25
28
} ;
26
29
}
27
30
31
+ componentDidMount ( ) {
32
+ const { ai_deny_index } = this . context . featureFlags ;
33
+ if ( ! ai_deny_index ) {
34
+ this . setState ( { redirect : true } ) ;
35
+ }
36
+ }
37
+
28
38
render ( ) {
29
- const { alerts } = this . state ;
39
+ const { alerts, redirect } = this . state ;
40
+
41
+ if ( redirect ) {
42
+ setTimeout ( ( ) => this . props . navigate ( formatPath ( Paths . collections ) ) ) ;
43
+ return null ;
44
+ }
30
45
31
46
return (
32
47
< React . Fragment >
@@ -66,7 +81,8 @@ export class LandingPage extends React.Component<RouteProps, IState> {
66
81
your Ansible host using{ ' ' }
67
82
< a
68
83
href = 'https://docs.ansible.com/ansible/latest/reference_appendices/galaxy.html#the-command-line-tool'
69
- target = '_blanck'
84
+ target = '_blank'
85
+ rel = 'noreferrer'
70
86
>
71
87
ansible-galaxy
72
88
</ a >
@@ -94,7 +110,7 @@ export class LandingPage extends React.Component<RouteProps, IState> {
94
110
target = '_blank'
95
111
rel = 'noopener noreferrer'
96
112
>
97
- Project Wisdom
113
+ Ansible Lightspeed
98
114
</ a > { ' ' }
99
115
to help other automators build Ansible content. Your roles
100
116
and collections may be used as training data for a machine
0 commit comments