1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/ui/pages/institutional/confirm-add-institutional-feature/confirm-add-institutional-feature.stories.js
Albert Olivé c52d2131d3
[MMI] Confirm-add-institutional-feature page (#18321)
* Added confirm add institutional feature page

* Finished implementing component

* Added all institutional ducks

* Fixed tests

* Removed ducks and console log

* Fixed snapshots

* Fixed messages json

* Changed method name and using useEffect

* Replace useEffect hook with a simple if statement to check if connectRequest exists and add null return statement to avoid warnings

* Remove unneeded dependency

* Added back useEffect and added a extra check to return null if connectRequest is false

* Fixed eslint problem

* Fixed all issues commented in the pr
2023-04-05 09:50:30 +01:00

58 lines
1.3 KiB
JavaScript

import React from 'react';
import { Provider } from 'react-redux';
import configureStore from '../../../store/store';
import testData from '../../../../.storybook/test-data';
import ConfirmAddInstitutionalFeature from '.';
const customData = {
...testData,
metamask: {
provider: {
type: 'test',
},
institutionalFeatures: {
complianceProjectId: '',
connectRequests: [
{
labels: [
{
key: 'service',
value: 'test',
},
],
origin: 'origin',
token: {
projectName: 'projectName',
projectId: 'projectId',
clientId: 'clientId',
},
},
],
},
preferences: {
useNativeCurrencyAsPrimaryCurrency: true,
},
},
};
const store = configureStore(customData);
export default {
title: 'Pages/Institutional/ConfirmAddInstitutionalFeature',
decorators: [(story) => <Provider store={store}>{story()}</Provider>],
component: ConfirmAddInstitutionalFeature,
args: {
history: {
push: () => {
/**/
},
},
},
};
export const DefaultStory = (args) => (
<ConfirmAddInstitutionalFeature {...args} />
);
DefaultStory.storyName = 'ConfirmAddInstitutionalFeature';