⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
import { useState } from "react";
export function useToolbarPresence(selectedCount: number) {
const [mounted, setMounted] = useState(selectedCount > 0);
const [lastCount, setLastCount] = useState(selectedCount);
if (selectedCount > 0 && !mounted) setMounted(true);
if (selectedCount > 0 && selectedCount !== lastCount) {
setLastCount(selectedCount);
}
return {
mounted,
hidden: selectedCount === 0,
displayCount: selectedCount > 0 ? selectedCount : lastCount,
};
}