Skip to content

Commit

Permalink
icon review
Browse files Browse the repository at this point in the history
  • Loading branch information
XdithyX committed Dec 8, 2022
1 parent 71dd80e commit 33648ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/ReviewDialog/ReviewDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ReviewDialog = ({open,handleClose}) => {

})
},[])
const handleSubmit=()=>{
const handleSubmit=(e)=>{
axiosInstance.post(`${baseUrl}/reviews/`,{
desc: description,
rate: rate,
Expand All @@ -27,8 +27,9 @@ const ReviewDialog = ({open,handleClose}) => {
}).then((response)=>{
console.log(response)
},(error)=>{

console.log(error)
})

}
return (
<div>
Expand Down
7 changes: 4 additions & 3 deletions src/pages/ReviewPage/ReviewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import baseUrl from '../../utils/Urls'
import ReviewCards from './ReviewCards'
import CustomTitle from '../../utils/CustomTitle'
import ReviewDialog from '../../components/ReviewDialog/ReviewDialog'
import {BsPlusCircle} from 'react-icons/bs'
function ReviewPage() {
const[reviews,setReviews]=useState([])
const[open,setOpen]=useState(false)
Expand All @@ -28,9 +29,9 @@ useEffect(()=>{
<ReviewDialog open={open} handleClose={handleClose} />
<div className='review__container'>
{
(localStorage.getItem('refresh_token'))?((<button className="review__popper" onClick={handleClickOpen} >
Review
</button> )):(( null))
(localStorage.getItem('refresh_token'))?(( <BsPlusCircle onClick={handleClickOpen} />

)):(( null))
}
{
reviews.map((item)=>{
Expand Down

0 comments on commit 33648ff

Please sign in to comment.