-
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 extraction of count values in scan history route Include extensions with no threats in useProtectData hook Init feature branch Remove unused component prop Fixup project versions Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Rename add-protect-threat-history-hooks-refactor to add-protect-threat-history Remove the status filter when there are no results to show Prevent access to history routes when user has no plan Remove isFetching check from scanError selector Remove optimistic scan status check from scanError selector Adjustments to scan fetching/in progress/results/error state management Fix status.status Adjust scan status selectors
- Loading branch information
1 parent
c502a04
commit 66ac702
Showing
27 changed files
with
328 additions
and
137 deletions.
There are no files selected for viewing
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,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Updated composer.lock. | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Updated composer.lock. | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
projects/plugins/jetpack/changelog/add-protect-threat-history
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,5 @@ | ||
Significance: patch | ||
Type: other | ||
Comment: Updated composer.lock. | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
projects/plugins/migration/changelog/add-protect-threat-history
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,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Updated composer.lock. | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
projects/plugins/protect/src/js/components/paid-plan-gate/index.tsx
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,29 @@ | ||
import { Navigate } from 'react-router-dom'; | ||
import useProtectData from '../../hooks/use-protect-data'; | ||
|
||
/** | ||
* Paid Plan Gate | ||
* | ||
* Custom route that only renders when the user has a paid plan. | ||
* | ||
* @param {object} props - The component props. | ||
* @param {JSX.Element} props.children - The component to render if the user has a paid plan. | ||
* @param {string} props.redirect - The alternate route to redirect to if the user does not have a paid plan. | ||
* | ||
* @returns {JSX.Element} The PaidPlanRoute component. | ||
*/ | ||
export default function PaidPlanGate( { | ||
children, | ||
redirect = '/', | ||
}: { | ||
children?: JSX.Element; | ||
redirect?: string; | ||
} ): JSX.Element { | ||
const { hasRequiredPlan } = useProtectData(); | ||
|
||
if ( ! hasRequiredPlan ) { | ||
return <Navigate to={ redirect } replace />; | ||
} | ||
|
||
return children; | ||
} |
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
Oops, something went wrong.