import { SelectControl, RangeControl, PanelBody, TextControl } from '@wordpress/components'; import { useState } from '@wordpress/element'; import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; import { Followers } from './followers'; import { useUserOptions } from '../shared/use-user-options'; export default function Edit( { attributes, setAttributes } ) { const { order, per_page, selectedUser, title } = attributes; const blockProps = useBlockProps(); const [ page, setPage ] = useState( 1 ); const orderOptions = [ { label: __( 'New to old', 'activitypub' ), value: 'desc' }, { label: __( 'Old to new', 'activitypub' ), value: 'asc' }, ]; const usersOptions = useUserOptions(); const setAttributestAndResetPage = ( key ) => { return ( value ) => { setPage( 1 ); setAttributes( { [ key ]: value } ); }; } return (
setAttributes( { title: value } ) } />
); }