Skip to content

Commit 44ecb3d

Browse files
Merge with main and reduce code complexity etc.
1 parent 5d88a77 commit 44ecb3d

File tree

79 files changed

+14032
-4060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+14032
-4060
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
run: npm test
2525
- name: Generates Secrets File
2626
run: |
27-
echo "export default { PROJECT_ID_MAINNET: '${{ secrets.PROJECT_ID_MAINNET }}', PROJECT_ID_PREVIEW: '${{ secrets.PROJECT_ID_PREVIEW }}', PROJECT_ID_PREPROD: '${{ secrets.PROJECT_ID_PREPROD }}'};" > secrets.production.js
27+
echo "export default { PROJECT_ID_MAINNET: '${{ secrets.PROJECT_ID_MAINNET }}', PROJECT_ID_PREVIEW: '${{ secrets.PROJECT_ID_PREVIEW }}', PROJECT_ID_PREPROD: '${{ secrets.PROJECT_ID_PREPROD }}', POSTHOG_API_KEY:'${{ secrets.POSTHOG_API_KEY }}', POSTHOG_PROJECT_ID: '${{ secrets.POSTHOG_PROJECT_ID }}', LACE_EXTENSION_ID: '${{ secrets.LACE_EXTENSION_ID }}'};" > secrets.production.js
2828
- name: Build
2929
run: npm run build
30-
with:
30+
env:
3131
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
32-
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
32+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
3333
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
3434
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
3535
- name: Upload build

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ secrets.development.js
2424

2525
# IDEs
2626
.idea
27+
28+
*storybook.log

.storybook/main.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const path = require('path');
2+
const { NormalModuleReplacementPlugin } = require('webpack');
3+
4+
const config = {
5+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
6+
addons: [
7+
'@storybook/addon-webpack5-compiler-swc',
8+
'@storybook/addon-onboarding',
9+
'@storybook/addon-links',
10+
'@storybook/addon-essentials',
11+
'@chromatic-com/storybook',
12+
'@storybook/addon-interactions',
13+
],
14+
framework: {
15+
name: '@storybook/react-webpack5',
16+
options: {},
17+
},
18+
webpackFinal: webPackconfig => {
19+
const fileLoaderRule = webPackconfig.module.rules.find(rule =>
20+
rule.test?.test('.svg'),
21+
);
22+
fileLoaderRule.exclude = /\.svg$/;
23+
webPackconfig.module.rules.push({
24+
test: /\.svg$/i,
25+
issuer: /\.[jt]sx?$/,
26+
use: [
27+
{
28+
loader: '@svgr/webpack',
29+
options: {
30+
icon: true,
31+
exportType: 'named',
32+
},
33+
},
34+
],
35+
});
36+
webPackconfig.resolve.extensions.push('.svg');
37+
if (webPackconfig.plugins) {
38+
webPackconfig.plugins.push(
39+
new NormalModuleReplacementPlugin(
40+
/^webextension-polyfill$/,
41+
path.join(__dirname, './mocks/webextension-polyfill.mock.ts'),
42+
),
43+
);
44+
}
45+
46+
return webPackconfig;
47+
},
48+
};
49+
export default config;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const runtime = {};
2+
export const storage = {};

.storybook/preview.jsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import { Box, DarkMode, Flex, LightMode } from '@chakra-ui/react';
3+
import Theme from '../src/ui/theme';
4+
5+
const preview = {
6+
parameters: {
7+
controls: {
8+
matchers: {
9+
color: /(background|color)$/i,
10+
date: /Date$/i,
11+
},
12+
},
13+
},
14+
};
15+
16+
export const decorators = [
17+
(Story) => {
18+
return (
19+
<Theme>
20+
<Flex>
21+
<LightMode>
22+
<Box p="50px">
23+
<Story />
24+
</Box>
25+
</LightMode>
26+
<DarkMode>
27+
<Box p="50px" backgroundColor="#2E2E2E">
28+
<Story />
29+
</Box>
30+
</DarkMode>
31+
</Flex>
32+
</Theme>
33+
);
34+
},
35+
];
36+
37+
export default preview;

0 commit comments

Comments
 (0)