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

Fix: "unique key" warnings in Tooltips #226

Merged
merged 2 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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