Skip to content

Commit 446abea

Browse files
committed
updates
1 parent 5b0db49 commit 446abea

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ jobs:
2323
- name: Set productDetails
2424
working-directory: examples/data
2525
run: node ./scripts/product-details.js
26+
env:
27+
NAMI_PRODUCT_DETAILS: '${{ secrets.NAMI_PRODUCT_DETAILS }}'
2628

2729
- name: Build
2830
run: yarn build:basic-react
2931
env:
30-
APP_PLATFORM_ID: ${{ vars.APP_PLATFORM_ID }}
31-
APP_PAYWALL_LABEL: ${{ vars.APP_PAYWALL_LABEL }}
32+
APP_PLATFORM_ID: ${{ secrets.APP_PLATFORM_ID }}
33+
APP_PAYWALL_LABEL: ${{ secrets.PLACEMENT_LABEL }}
3234

3335
- name: Deploy to Cloudflare Pages
3436
run: yarn deploy:basic-react

examples/nextjs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This directory contains a simple example of how to use the Nami Web SDK with a [
88

99
This example demonstrates how to initialize the Nami SDK and launch a paywall.
1010

11-
You will need to replace `APP_PLATFORM_ID` and `'YOUR_PLACEMENT_LABEL'` in src/Paywall.tsx with your actual App Platform ID and placement label.
11+
You will need to replace `APP_PLATFORM_ID` and `'YOUR_PLACEMENT_LABEL'` in src/app/page.tsx with your actual App Platform ID and placement label.
1212

1313
1. Install the dependencies via NPM or Yarn:
1414

examples/nextjs/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from "@namiml/web-sdk";
1313
import productDetails from "../../../data/product-details.json";
1414

15-
const APP_PLATFORM_ID = ''; // Your App Platform ID
15+
const APP_PLATFORM_ID = 'YOUR_APP_PLATFORM_ID'; // Your App Platform ID
1616

1717

1818
export default function Paywall() {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@namiml/nami-web-sdk",
2+
"name": "@namiml/nami-web-sdk-examples",
33
"private": true,
44
"version": "1.0.0",
55
"description": "Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing",

scripts/prebuild:basic-react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dotenv.config();
1010

1111
// Define app specific variables
1212
const APP_PLATFORM_ID = process.env.APP_PLATFORM_ID;
13-
const APP_PAYWALL_LABEL = process.env.APP_PAYWALL_LABEL;
13+
const APP_PAYWALL_LABEL = process.env.PLACEMENT_LABEL;
1414

1515
// Define the paths
1616
const examplePath = path.join(__dirname, '..', 'examples', 'basic-react');

0 commit comments

Comments
 (0)