Skip to content

Commit

Permalink
fix: blog filter
Browse files Browse the repository at this point in the history
fixed
  • Loading branch information
ajoneoito committed Dec 9, 2021
1 parent 251c418 commit cb4c5e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions component/admin/EventInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { useRef, useState, useEffect } from "react";
export default function EventInfo ({ eventDetails, setEventDetails , eventDetailsError , setEventDetailsError }) {
const [fileName, setFileName] = useState("");
const ref = useRef();
console.log(eventDetails?.eventImage);
const [pimg, setPimg] = useState()
const [pimg, setPimg] = useState('')
const imageUploadHandler = async (e) => {
const imageFile = e.target.files[0];
setPimg(imageFile)
Expand Down Expand Up @@ -211,7 +210,6 @@ export default function EventInfo ({ eventDetails, setEventDetails , eventDetail
onClick={() => ref.current.click()}
>
<label htmlFor="inputFiles" className="font-bold relative">
{console.log(eventDetails)}
{eventDetails?.eventImage === "" ? "Upload Image" : <img src={pimg ? URL.createObjectURL(pimg) : eventDetails.eventImage} alt="Something error..." /> }
<input
type="file"
Expand Down
3 changes: 0 additions & 3 deletions pages/admin/blogs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ const Admin = () => {

async function getPostByTag(tagName, status) {
try {
const statusUpdate = {
status: status
};
const data = await PostService.getPostByTags(tagName, status);
const { posts, count } = data.data;
setPostData({ posts, count });
Expand Down

0 comments on commit cb4c5e1

Please sign in to comment.