Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Icon, IconButton } from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import React, { FunctionComponent } from 'react';
import { useDebounce } from 'use-debounce';
/**
* Internal dependencies
*/
import { DomainSuggestions } from '@automattic/data-stores';
import { STORE_KEY as ONBOARD_STORE } from '../../stores/onboard';
import './style.scss';
import { DomainPickerButton } from '../domain-picker';
import { selectorDebounce } from '../../constants';
import Link from '../link';
const DOMAIN_SUGGESTIONS_STORE = DomainSuggestions.register();
interface Props {
isEditorSidebarOpened: boolean;
next?: string;
prev?: string;
toggleGeneralSidebar: () => void;
toggleSidebarShortcut: KeyboardShortcut;
}
interface KeyboardShortcut {
raw: string;
display: string;
ariaLabel: string;
}
const Header: FunctionComponent< Props > = ( {Panel,
PanelBody,
PanelRow,
TextControl,
} from '@wordpress/components';
import { __ as NO__ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { useDebounce } from 'use-debounce';
/**
* Internal dependencies
*/
import { DomainSuggestions } from '@automattic/data-stores';
import { selectorDebounce } from '../../constants';
const DOMAIN_SUGGESTIONS_STORE = DomainSuggestions.register();
export interface Props {
/**
* Term to search when no user input is provided.
*/
defaultQuery?: string;
/**
* Callback that will be invoked when a domain is selected.
*
* @param domainSuggestion The selected domain.
*/
onDomainSelect: ( domainSuggestion: DomainSuggestions.DomainSuggestion ) => void;
/**
* Additional parameters for the domain suggestions query.