@climatetradedevportal/global-header
v1.0.41
Published
## Installation.
Downloads
10
Readme
Climatetrade Global Header
Installation.
npm i @climatetradecarbon/global-header
or
yarn add @climatetradecarbon/global-header
Usage
Environment setup
Some environment variables has no values because their values can change dynamically between different environments. Those that do have value must be consistent with those values in all environments and apps.
CLIMATETRADE_API_URL=
TOKEN_NAME=
CT_CART_COOKIE=ct-cart
CT_COUNTRY_COOKIE=ct-country
CT_CURRENCY_COOKIE=ct-currency
CT_LANGUAGE_COOKIE=ct-language
CT_DOMAIN=
STRAPI_URL=
Code
import { GlobalHeader } from '@climatetradecarbon/global-header';
...
export default function MyApp() {
...
return <GlobalHeader data={data} />
}
In the previous example data
is the data contained in the response of Strapi. We should call strapi from _app.tsx on NextJs to enable SSR.