INNER CODE UNIT · JavaScript
handleVote
collabnix/kubetools · portal/KubeToolsPortal.js:181
const handleVote = (toolName) => {
setVotes(prevVotes => ({
...prevVotes,
[toolName]: prevVotes[toolName] + 1
}));
};
// Format stars count for display
const formatStars = (count) => {
if (count >= 1000) {
return `${(count / 1000).toFixed(1)}k`;
}
return count;
};
return (
<div className="flex flex-col h-screen bg-gray-100">
{/* Header with Kubernetes Logo */}