@lendi-ui/scripts
v2.1.0
Published
Scripts used among teams
Downloads
1,292
Maintainers
Keywords
Readme
@lendi-ui/scripts
Scripts used among teams
Installation
yarn add @lendi-ui/scripts
Usage
// brand specific import
import { AUSSIE_IS_SCRIPTS } from '@lendi-ui/scripts';
// general import
import { IS_SCRIPTS } from '@lendi-ui/scripts';
const env = process.env.REACT_APP_ENVIRONMENT;
const brand = getBrandFromHostname();
// general document html
<head>
{/*... other scripts*/}
{AUSSIE_IS[env]}
{/*... other scripts*/}
</head>;
// in some tsx outside document, you may wanna use Helmet
const Component = () => <Helmet>{IS_SCRIPTS[brand][env]}</Helmet>;
Table of contents
- Interaction Studio Links:
LENDI_IS_SCRIPTS
|AUSSIE_IS_SCRIPTS
|IS_SCRIPTS