small fix for vote buttons

This commit is contained in:
hzrd149
2023-10-21 22:15:16 -05:00
parent 7e92713182
commit 0f1e677459

View File

@ -63,7 +63,7 @@ export default function PostVoteButtons({
variant={hasUpVote ? "solid" : "ghost"} variant={hasUpVote ? "solid" : "ghost"}
isLoading={loading} isLoading={loading}
onClick={() => addVote("+")} onClick={() => addVote("+")}
isDisabled={!account || !!hasUpVote} isDisabled={!account || !!hasUpVote || !!hasDownVote}
colorScheme={hasUpVote ? "primary" : "gray"} colorScheme={hasUpVote ? "primary" : "gray"}
/> />
{(up || down) && <Text my="1">{vote}</Text>} {(up || down) && <Text my="1">{vote}</Text>}
@ -75,7 +75,7 @@ export default function PostVoteButtons({
variant={hasDownVote ? "solid" : "ghost"} variant={hasDownVote ? "solid" : "ghost"}
isLoading={loading} isLoading={loading}
onClick={() => addVote("-")} onClick={() => addVote("-")}
isDisabled={!account || !!hasUpVote} isDisabled={!account || !!hasUpVote || !!hasDownVote}
/> />
</Card> </Card>
); );