2.1.0 • Published 12 months ago

@lendi-ui/scripts v2.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

@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
2.1.0

12 months ago

2.0.0

12 months ago