Skip to content

Commit

Permalink
Update DeletePageButton.js
Browse files Browse the repository at this point in the history
remove redundant package and code
  • Loading branch information
leemyongpakva authored Oct 19, 2024
1 parent 50eb033 commit a58a37c
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions plugins/data-basics-59c8f8/src/components/DeletePageButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { store as noticesStore } from '@wordpress/notices';
import { store as coreDataStore } from '@wordpress/core-data';
import { useSelect, useDispatch } from '@wordpress/data';
import { useEffect } from '@wordpress/element';
import { Button, Spinner } from '@wordpress/components';

const DeletePageButton = ( { pageId } ) => {
Expand Down Expand Up @@ -42,19 +41,8 @@ const DeletePageButton = ( { pageId } ) => {
'page',

Check failure on line 41 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (18)

Delete `↹`

Check failure on line 41 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (lts/*)

Delete `↹`
pageId

Check failure on line 42 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (18)

Delete `↹`

Check failure on line 42 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (lts/*)

Delete `↹`
),

Check failure on line 43 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (18)

Delete `↹`

Check failure on line 43 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (lts/*)

Delete `↹`
error: select( coreDataStore ).getLastEntityDeleteError(
'postType',
'page',
pageId
),
} ),
[ pageId ]
} )

Check failure on line 44 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (18)

Replace `↹↹}·)⏎↹` with `↹}·)·`

Check failure on line 44 in plugins/data-basics-59c8f8/src/components/DeletePageButton.js

View workflow job for this annotation

GitHub Actions / JavaScript and CSS (lts/*)

Replace `↹↹}·)⏎↹` with `↹}·)·`
);
useEffect( () => {
if ( error ) {
// Display the error
}
}, [ error ] );
return (
<Button
variant="primary"
Expand Down

0 comments on commit a58a37c

Please sign in to comment.