MCPcopy Create free account
hub / github.com/GreatStackDev/gocart / handleSubmit

Function handleSubmit

components/RatingModal.jsx:13–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 const [review, setReview] = useState('');
12
13 const handleSubmit = async () => {
14 if (rating < 0 || rating > 5) {
15 return toast('Please select a rating');
16 }
17 if (review.length < 5) {
18 return toast('write a short review');
19 }
20
21 setRatingModal(null);
22 }
23
24 return (
25 <div className='fixed inset-0 z-120 flex items-center justify-center bg-black/10'>

Callers 1

RatingModalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected