remove unneeded useMemo
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 27s Details

This commit is contained in:
Ladd Hoffman 2024-03-29 12:21:10 -05:00
parent 51c954a6da
commit 3c839a8546
3 changed files with 1 additions and 4 deletions

View File

@ -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]);

View File

@ -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}>

View File

@ -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);
};