-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/payment blocks connection banner showing on simple sites (#39687)
* Fix connection banner for payment blocks on simple sites * changelog * Fix condition
- Loading branch information
1 parent
e447276
commit 9449d43
Showing
8 changed files
with
26 additions
and
12 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ts/plugins/jetpack/changelog/fix-payment-blocks-connection-banner-showing-on-simple-sites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: other | ||
|
||
Fix issue where connection banner was showing for simple sites |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
projects/plugins/jetpack/extensions/shared/use-is-user-connected.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useConnection } from '@automattic/jetpack-connection'; | ||
import { isSimpleSite } from '@automattic/jetpack-shared-extension-utils'; | ||
|
||
const useIsUserConnected: () => boolean = () => { | ||
const { isUserConnected } = useConnection(); | ||
|
||
return isSimpleSite() || isUserConnected; | ||
}; | ||
|
||
export default useIsUserConnected; |