Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
441 Bytes
import React from 'react';
import { useSelector } from 'react-redux';
import { Navigate } from 'react-router-dom';
import CreatePost from './CreatePost';
const EditPost = () => {
const currentPostData = useSelector(
(state) => state.currentPost.currentPostData
);
if (!currentPostData) {
return <Navigate to={-1} />;
}
return <CreatePost currentPostDataToEdit={currentPostData} />;
};
export default EditPost;