exercise 1.9
This commit is contained in:
parent
3bb4f34611
commit
d301767634
|
@ -1,9 +1,15 @@
|
|||
import { useState } from 'react'
|
||||
|
||||
// Lol it's already factored that way :3
|
||||
const Stats = ({ positive, neutral, negative }) => {
|
||||
const total = positive - negative
|
||||
const votes = positive + neutral + negative
|
||||
if (votes == 0) {
|
||||
return (
|
||||
<>
|
||||
<p> No Votes Cast Yet </p>
|
||||
</>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<h2> Results </h2>
|
||||
|
|
Loading…
Reference in a new issue