Skip to content

Commit

Permalink
attempt fix chromatic env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum committed Mar 15, 2024
1 parent c1d4a4b commit 4e356e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/chromatic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@ jobs:
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/react-kit
env:
STORYBOOK_INFURA_PROJECT_SECRET: ${{ secrets.STORYBOOK_INFURA_PROJECT_SECRET }}
STORYBOOK_REACT_APP_MAGIC_API_KEY: ${{ secrets.STORYBOOK_REACT_APP_MAGIC_API_KEY }}
11 changes: 8 additions & 3 deletions packages/react-kit/src/stories/widgets/Commit.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { EnvironmentType, getEnvConfigs } from "@bosonprotocol/core-sdk";
import React from "react";
const envVars = process.env;
console.log("envVars", envVars);
const envName =
(envVars.STORYBOOK_DATA_ENV_NAME as EnvironmentType) || "testing";
import { ComponentMeta, ComponentStory, Story } from "@storybook/react";

Check failure on line 7 in packages/react-kit/src/stories/widgets/Commit.stories.tsx

View workflow job for this annotation

GitHub Actions / Lint, build and test

Import in body of module; reorder to top

// eslint-disable-next-line import/first
import { CommitWidget } from "../../components/widgets/commit/CommitWidget";
import { EnvironmentType, getEnvConfigs } from "@bosonprotocol/core-sdk";

// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
export default {
title: "Widgets/Commit",
Expand All @@ -19,8 +25,7 @@ const wrapper = (Story: Story) => (
<Story />
</div>
);
const envName =
(process.env.STORYBOOK_DATA_ENV_NAME as EnvironmentType) || "testing";

const envConfig = getEnvConfigs(envName);

export const Commit: ComponentStory<typeof CommitWidget> = Template.bind({});
Expand Down

0 comments on commit 4e356e1

Please sign in to comment.