Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 2ed6f94

Browse files
authored
Fix: "unique key" warnings in Tooltips (#226)
* Fix: "unique key" warnings in Tooltip * v2.0.5
1 parent 1158272 commit 2ed6f94

File tree

4 files changed

+7
-44
lines changed

4 files changed

+7
-44
lines changed

.storybook/webpack.config.js

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,9 @@
1-
module.exports = ({ config }) => {
2-
config.module.rules.push({
3-
test: /\.(ts|js)x?$/,
4-
exclude: [/node_modules/],
5-
use: {
6-
loader: 'ts-loader',
7-
},
8-
});
9-
10-
config.module.rules.push({
11-
test: /\.css$/i,
12-
use: ['style-loader', 'css-loader'],
13-
});
14-
15-
// remove svg from existing rule
16-
config.module.rules = config.module.rules.map((rule) => {
17-
if (
18-
String(rule.test) ===
19-
String(
20-
/\.(svg|ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/
21-
)
22-
) {
23-
return {
24-
...rule,
25-
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/,
26-
};
27-
}
1+
const mainConfig = require('../webpack.config.js');
282

29-
return rule;
30-
});
31-
32-
config.module.rules.push({
33-
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
34-
type: 'asset/resource',
35-
generator: {
36-
filename: '[name][ext][query]',
37-
},
38-
});
39-
40-
config.module.rules.push({
41-
test: /\.(png|jpg)$/i,
42-
type: 'asset/inline',
43-
});
3+
module.exports = ({ config }) => {
4+
config.module.rules = mainConfig.module.rules;
445

45-
config.resolve.extensions.push('.ts', '.tsx', 'woff2');
6+
config.resolve.extensions.push('.ts', '.tsx', '.svg', 'woff2');
467

478
return config;
489
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/safe-react-components",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "Safe UI components",
55
"main": "dist/index.min.js",
66
"typings": "dist/index.d.ts",

src/components/EthHashInfo/CopyButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const CopyButton = ({
4242
placement="top"
4343
onMouseLeave={handleMouseLeave}>
4444
<IconButton
45+
key="copy"
4546
aria-label={initialToolTipText}
4647
onClick={handleCopy}
4748
className={className}

src/components/ExplorerButton/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const ExplorerButton = ({
2121
return (
2222
<Tooltip title={title} placement="top">
2323
<IconButton
24+
key="explorer"
2425
href={href}
2526
target="_blank"
2627
rel="noopener noreferrer"

0 commit comments

Comments
 (0)