This file contains hidden or 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
| { | |
| "properties": { | |
| "name": { | |
| "description": "The slug name of your site.", | |
| "type": "string", | |
| "minLength": 1 | |
| }, | |
| "production": { | |
| "description": "The production URL of your site.", | |
| "type": "object", |
This file contains hidden or 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
| import { useEffect, useState } from 'react' | |
| /** | |
| * Custom hook that listens for keydown events and triggers a callback when specified keys are pressed. | |
| * | |
| * @param {Function} callback - The function to call when one of the specified keys is pressed. | |
| * @param {Array<string>} keys - An array of key names to listen for. | |
| */ | |
| export default function useKeyDown(callback, keys) { | |
| const onKeyDown = (event) => { |
OlderNewer