open-vault/ui/app/components/token-expire-warning.js
Jordan Reimer 52fe56ec87
Eslint prefer-const (#17864)
* adds prefer-const to eslint config and runs fixer

* reverts unintended change
2022-11-09 15:15:31 -08:00

15 lines
383 B
JavaScript

import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
export default class TokenExpireWarning extends Component {
@service router;
get showWarning() {
const currentRoute = this.router.currentRouteName;
if ('vault.cluster.oidc-provider' === currentRoute) {
return false;
}
return !!this.args.expirationDate;
}
}