-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
Astra
theme from 4.8.7 to 4.8.8
- Loading branch information
1 parent
883afba
commit ab1f055
Showing
79 changed files
with
3,511 additions
and
758 deletions.
There are no files selected for viewing
2,098 changes: 2,098 additions & 0 deletions
2,098
wp-content/themes/astra/admin/assets/build/dashboard-app-rtl.css
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
wp-content/themes/astra/admin/assets/build/dashboard-app.asset.php
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 |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '018a8a292b320964c5d4'); | ||
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '6e12b4be15a57c232c38'); |
161 changes: 78 additions & 83 deletions
161
wp-content/themes/astra/admin/assets/build/dashboard-app.css
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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,3 @@ | ||
import useDebounceEffect from "./useDebounceEffect"; | ||
|
||
export { useDebounceEffect }; |
25 changes: 25 additions & 0 deletions
25
wp-content/themes/astra/admin/assets/hooks/useDebounceEffect.js
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,25 @@ | ||
import { useEffect } from 'react'; | ||
import { debounce } from '@astra-utils/helpers'; | ||
|
||
/** | ||
* A hook that wraps a callback function with a debounce effect. | ||
* | ||
* This hook is designed to delay the execution of a function until after a specified delay. | ||
* It's particularly useful for handling events that occur rapidly, such as typing in a text input. | ||
* | ||
* @param {Function} callback - The function to debounce. | ||
* @param {number} delay - The delay in milliseconds before the function is executed. | ||
* @param {Array} dependencies - An array of dependencies that trigger the effect. | ||
*/ | ||
function useDebounceEffect( callback, delay, dependencies ) { | ||
useEffect( () => { | ||
const debouncedCallback = debounce( callback, delay ); | ||
|
||
debouncedCallback(); | ||
|
||
// Cleanup on unmount or when dependencies change. | ||
return () => debouncedCallback.cancel && debouncedCallback.cancel(); | ||
}, [ callback, delay, ...dependencies ] ); | ||
} | ||
|
||
export default useDebounceEffect; |
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.