remove unneeded useMemo
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 27s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 27s
Details
This commit is contained in:
parent
51c954a6da
commit
3c839a8546
|
@ -266,7 +266,6 @@ function App() {
|
|||
|
||||
const handleShowViewPost = useCallback(async ({ contentId }) => {
|
||||
const post = await Post.read(contentId);
|
||||
console.log('handleShowViewPost, read', { post });
|
||||
setViewPost(post);
|
||||
setShowViewPost(true);
|
||||
}, [setViewPost, setShowViewPost]);
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
import Button from 'react-bootstrap/Button';
|
||||
import Modal from 'react-bootstrap/Modal';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
function ViewPostModal({
|
||||
show, setShow, title, post,
|
||||
}) {
|
||||
const handleClose = () => setShow(false);
|
||||
const { content, author } = useMemo(() => post, [post]);
|
||||
const { content, author } = post;
|
||||
|
||||
return (
|
||||
<Modal show={show} onHide={handleClose}>
|
||||
|
|
|
@ -134,7 +134,6 @@ function WorkRequests({
|
|||
|
||||
const handleShowViewRequestModal = async (request) => {
|
||||
const post = await Post.read(request.requestContentId);
|
||||
console.log('show post modal', { post });
|
||||
setViewRequest(post);
|
||||
setShowViewRequestModal(true);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue