LandingPage/ImagesTable/Wizard: Remove all insights global calls
This commit replaces all calls to the insights.chrome global with calls to the useChrome() hook (or the useGetEnvironment() custom hook that wraps useChrome()).
This commit is contained in:
parent
ef1d077c2e
commit
7bca4c7438
10 changed files with 55 additions and 98 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome';
|
||||
|
||||
export const useGetEnvironment = () => {
|
||||
const { isBeta, getEnvironment } = useChrome();
|
||||
const { isBeta, isProd, getEnvironment } = useChrome();
|
||||
// Expose beta features in the ephemeral environment
|
||||
if (isBeta() || getEnvironment() === 'qa') {
|
||||
return { isBeta: () => true };
|
||||
return { isBeta: () => true, isProd: isProd };
|
||||
}
|
||||
return { isBeta: () => false };
|
||||
return { isBeta: () => false, isProd: isProd };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue