Skip to content

Commit

Permalink
fix editing asks
Browse files Browse the repository at this point in the history
Issue: AAH-2172
  • Loading branch information
ShaiahWren committed Apr 24, 2023
1 parent fa0122d commit 5c5eec9
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions src/containers/landing/landing-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import {
closeAlertMixin,
} from 'src/components';
import { AppContext } from 'src/loaders/app-context';
import { Paths, formatPath } from 'src/paths';
import { RouteProps, withRouter } from 'src/utilities';
import './landing-page.scss';

interface IState {
alerts: AlertType[];
redirect: boolean;
}

export class LandingPage extends React.Component<RouteProps, IState> {
Expand All @@ -22,11 +24,24 @@ export class LandingPage extends React.Component<RouteProps, IState> {

this.state = {
alerts: [],
redirect: false,
};
}

componentDidMount() {
const { ai_deny_index } = this.context.featureFlags;
if (!ai_deny_index) {
this.setState({ redirect: true });
}
}

render() {
const { alerts } = this.state;
const { alerts, redirect } = this.state;

if (redirect) {
setTimeout(() => this.props.navigate(formatPath(Paths.collections)));
return null;
}

return (
<React.Fragment>
Expand Down Expand Up @@ -66,7 +81,8 @@ export class LandingPage extends React.Component<RouteProps, IState> {
your Ansible host using{' '}
<a
href='https://docs.ansible.com/ansible/latest/reference_appendices/galaxy.html#the-command-line-tool'
target='_blanck'
target='_blank'
rel='noreferrer'
>
ansible-galaxy
</a>
Expand Down Expand Up @@ -94,7 +110,7 @@ export class LandingPage extends React.Component<RouteProps, IState> {
target='_blank'
rel='noopener noreferrer'
>
Project Wisdom
Ansible Lightspeed
</a>{' '}
to help other automators build Ansible content. Your roles
and collections may be used as training data for a machine
Expand Down

0 comments on commit 5c5eec9

Please sign in to comment.