Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 Add default button class for styling #61

Merged
merged 1 commit into from
May 14, 2024
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
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-rainbow",
"version": "0.5.0",
"version": "0.5.1",
"description": "RainbowKit Login (Web3 Integration for Sign-In With Ethereum)",
"author": "Davis Shaver",
"license": "GPL-2.0-or-later",
Expand All @@ -21,11 +21,11 @@
"url": "https://github.com/davisshaver/wp-rainbow/issues"
},
"dependencies": {
"@rainbow-me/rainbowkit": "^2.0.6",
"@tanstack/react-query": "^5.34.2",
"@rainbow-me/rainbowkit": "^2.0.7",
"@tanstack/react-query": "^5.36.0",
"@wordpress/block-editor": "^12.25.0",
"@wordpress/blocks": "^12.34.0",
"@wordpress/components": "^27.4.0",
"@wordpress/components": "^27.5.0",
"@wordpress/i18n": "^4.57.0",
"classnames": "^2.5.1",
"process": "^0.11.10",
Expand All @@ -34,12 +34,12 @@
"react-style-proptype": "^3.2.2",
"simple-siwe": "^0.1.4",
"util": "^0.12.5",
"viem": "^2.9.31",
"wagmi": "^2.8.1"
"viem": "^2.10.5",
"wagmi": "^2.8.7"
},
"devDependencies": {
"@babel/preset-react": "^7.24.1",
"@wordpress/eslint-plugin": "^17.13.0",
"@wordpress/eslint-plugin": "^18.0.0",
"@wordpress/scripts": "^27.8.0",
"css-loader": "^7.1.1",
"eslint-config-airbnb": "^19.0.4",
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ Find reference implementations of all filters in [example plugin here](https://g

== Changelog ==

= 0.5.1 =
* Add default helper classname for button

= 0.5.0 =
* Add support for custom RPC URLs and Base/Zora networks
* Add helper classnames to buttons for additional style customization
Expand Down
2 changes: 2 additions & 0 deletions src/connect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@
setState( ( x ) => ( { ...x, error, loading: false } ) );
}
} catch ( error ) {
// eslint-disable-next-line no-console
console.error( error );
setState( ( x ) => ( { ...x, error, loading: false } ) );
}
}, [ address, chain, ensName ] );

Check warning on line 156 in src/connect.jsx

View workflow job for this annotation

GitHub Actions / lint

React Hook React.useCallback has missing dependencies: 'mockLogin', 'onError', 'onLogin', 'provider', 'redirectBoomerang', 'redirectURL', and 'signMessageAsync'. Either include them or remove the dependency array. If 'onLogin' changes too often, find the parent component that defines it and wrap that definition in useCallback

const [ triggeredLogin, setTriggeredLogin ] = React.useState( false );
React.useEffect( () => {
Expand Down Expand Up @@ -212,10 +213,11 @@
) {
window.signingIn = []; // Clear signin attempt
}
}, [ address, isENSSuccess, state.address ] );

Check warning on line 216 in src/connect.jsx

View workflow job for this annotation

GitHub Actions / lint

React Hook React.useEffect has missing dependencies: 'activeConnector', 'connections', 'disconnect', 'onLogout', 'signIn', and 'triggeredLogin'. Either include them or remove the dependency array. If 'onLogout' changes too often, find the parent component that defines it and wrap that definition in useCallback

const buttonClassNameWithState = React.useMemo( () => {
let buttonClassNameEnriched = buttonClassName;
buttonClassNameEnriched += ' wpr-button';
if ( LOGGED_IN ) {
buttonClassNameEnriched += ' wpr-logged-in';
}
Expand Down
4 changes: 2 additions & 2 deletions wp-rainbow.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: RainbowKit Login (Web3 Integration for Sign-In With Ethereum)
* Plugin URI: https://wp-rainbow.davisshaver.com/
* Description: RainbowKit Login allows WordPress users to log in with Ethereum using the Sign-In With Ethereum standard, powered by RainbowKit.
* Version: 0.5.0
* Version: 0.5.1
* Author: Davis Shaver
* Author URI: https://davisshaver.com/
* License: GPL v2 or later
Expand All @@ -27,7 +27,7 @@
/**
* WP Rainbow version number
*/
define( 'WP_RAINBOW_ASSETS_VERSION', '0.5.0' );
define( 'WP_RAINBOW_ASSETS_VERSION', '0.5.1' );

// Include the autoloader.
add_action(
Expand Down
Loading
Loading