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

Commit

Permalink
Fix: "unique key" warnings in Tooltips (#226)
Browse files Browse the repository at this point in the history
* Fix: "unique key" warnings in Tooltip

* v2.0.5
  • Loading branch information
katspaugh authored Mar 26, 2023
1 parent 1158272 commit 2ed6f94
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 44 deletions.
47 changes: 4 additions & 43 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,9 @@
module.exports = ({ config }) => {
config.module.rules.push({
test: /\.(ts|js)x?$/,
exclude: [/node_modules/],
use: {
loader: 'ts-loader',
},
});

config.module.rules.push({
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
});

// remove svg from existing rule
config.module.rules = config.module.rules.map((rule) => {
if (
String(rule.test) ===
String(
/\.(svg|ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/
)
) {
return {
...rule,
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/,
};
}
const mainConfig = require('../webpack.config.js');

return rule;
});

config.module.rules.push({
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
type: 'asset/resource',
generator: {
filename: '[name][ext][query]',
},
});

config.module.rules.push({
test: /\.(png|jpg)$/i,
type: 'asset/inline',
});
module.exports = ({ config }) => {
config.module.rules = mainConfig.module.rules;

config.resolve.extensions.push('.ts', '.tsx', 'woff2');
config.resolve.extensions.push('.ts', '.tsx', '.svg', 'woff2');

return config;
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-react-components",
"version": "2.0.4",
"version": "2.0.5",
"description": "Safe UI components",
"main": "dist/index.min.js",
"typings": "dist/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/components/EthHashInfo/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const CopyButton = ({
placement="top"
onMouseLeave={handleMouseLeave}>
<IconButton
key="copy"
aria-label={initialToolTipText}
onClick={handleCopy}
className={className}
Expand Down
1 change: 1 addition & 0 deletions src/components/ExplorerButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const ExplorerButton = ({
return (
<Tooltip title={title} placement="top">
<IconButton
key="explorer"
href={href}
target="_blank"
rel="noopener noreferrer"
Expand Down

0 comments on commit 2ed6f94

Please sign in to comment.