Skip to content

Commit

Permalink
[FIX] charts images
Browse files Browse the repository at this point in the history
  • Loading branch information
Artkrygin committed Jul 1, 2021
1 parent 8c5600d commit 1235c20
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/cells/AntdCellG2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ import React from 'react';
import { uiTypeIs, rankWith, RankedTester } from '../testers';
import { withStoreToCellProps } from '../util/ContextToProps';
import { Image } from 'antd';
import chart1 from './images/chart_1.png';
import chart2 from './images/chart_2.png';
import chart3 from './images/chart_3.png';
import chart4 from './images/chart_4.png';

const template: any = {
'https://www.wildberries.ru/catalog/15570386/detail.aspx': chart1,
'https://www.wildberries.ru/catalog/15622789/detail.aspx': chart2,
'https://www.wildberries.ru/catalog/16170086/detail.aspx': chart3,
'https://www.wildberries.ru/catalog/18247707/detail.aspx': chart4,
'https://www.wildberries.ru/catalog/15570386/detail.aspx': '/img/chart_1.png',
'https://www.wildberries.ru/catalog/15622789/detail.aspx': '/img/chart_2.png',
'https://www.wildberries.ru/catalog/16170086/detail.aspx': '/img/chart_3.png',
'https://www.wildberries.ru/catalog/18247707/detail.aspx': '/img/chart_4.png',
};

export const AntdCellG2 = (props: any) => {
console.log('PROPS', props);
return <Image src={template[props.data['@id']]} />;
Expand Down

0 comments on commit 1235c20

Please sign in to comment.