Before using the LateralWrapper, you need to initialize the library with your API key:
npm install @bkbarry-lateral/tm-connectorBefore using the LateralWrapper, you need to initialize the library with your API key:
``jsx
import { initLateral } from "tailormade-headless";
initLateral({
apiKey: "YOUR_API_KEY",
userId: "CURRENT_USER_ID",
});
`
`jsx
import { LateralWrapper } from 'tailormade-headless';
...
Default text if backend is not reachable
My content
`
To develop this package locally and test it in tailormade-fe, use Yalc:
1. Install Yalc globally (if not already installed):
``
npm install -g yalc
2. From the root of the project, run:
``
yalc publish
3. In the tailormade-fe directory, run:
``
yalc add @bkbarry-lateral/tm-connector
4. When you make changes to this package, run the following in this directory:
``
yalc push --scripts --update --replace --sig
This will build the package and update all projects using it via Yalc.
5. When you're done developing and want to switch back to the npm version, go to the tailormade-fe directory and run:`
``
yalc remove @bkbarry-lateral/tm-connector
npm install