Skip to content

Commit

Permalink
Merge pull request #23 from seamapi/pub-key-from-env
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Apr 20, 2023
2 parents 331e9d6 + fa0e83d commit 8371336
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { existsSync } from 'node:fs'
import { join, parse, resolve } from 'node:path'

import type { StorybookConfig } from '@storybook/react-webpack5'
import { type StorybookConfig } from '@storybook/react-webpack5'
import { NormalModuleReplacementPlugin } from 'webpack'
import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin'

Expand Down
8 changes: 5 additions & 3 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import type { Preview } from '@storybook/react'
import { type Preview } from '@storybook/react'

import { SeamProvider } from 'index.js'

// UPSTREAM: Use toolbar input when it lands.
// https://github.com/storybookjs/storybook/pull/21959
const publishableKey = 'seam_pk1fGd41X_zKs0ZELRWEc8nWxiBsrTFC98'
const defaultPublishableKey =
process.env['STORYBOOK_SEAM_PUBLISHABLE_KEY'] ??
'seam_pk1fGd41X_zKs0ZELRWEc8nWxiBsrTFC98'

const preview: Preview = {
parameters: {
Expand All @@ -19,7 +21,7 @@ const preview: Preview = {
decorators: [
(Story) => {
return (
<SeamProvider publishableKey={publishableKey} endpoint='/api'>
<SeamProvider publishableKey={defaultPublishableKey} endpoint='/api'>
<Story />
</SeamProvider>
)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $ npm install

#### Automatic

New versions are released automatically with [semantic-release].
New versions are released automatically with [semantic-release]
as long as commits follow the [Angular Commit Message Conventions].

[Angular Commit Message Conventions]: https://semantic-release.gitbook.io/semantic-release/#commit-message-format
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/DeviceManager/DeviceManager.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Meta, StoryObj } from '@storybook/react'
import { type Meta, type StoryObj } from '@storybook/react'

import { DeviceManager } from './DeviceManager.js'

Expand Down

1 comment on commit 8371336

@vercel
Copy link

@vercel vercel bot commented on 8371336 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react – ./

react-seamapi.vercel.app
react-git-main-seamapi.vercel.app
seam-react.vercel.app

Please sign in to comment.