{checklistItems.length - openChecklistItems.length} out of{" "}
{checklistItems.length} completed
>
}
buttonText="See Next Steps"
buttonLink="/home"
/>
);
}
const showSupport =
supportAlbyAppsData &&
supportAlbyAppsData.apps.length === 0 &&
!albyMe?.subscription.plan_code;
if (
!location.pathname.startsWith("/support-alby") &&
showSupport &&
(!hiddenUntil || new Date() >= new Date(hiddenUntil))
) {
return (
{
// Set the date to the next 21st of the month
const now = new Date();
const next21st = new Date(
now.getFullYear(),
now.getMonth() + (now.getDate() >= 21 ? 1 : 0),
21
).toString();
localStorage.setItem(
localStorageKeys.supportAlbySidebarHintHiddenUntil,
next21st
);
setHiddenUntil(next21st);
toast("No worries, we'll remind you again!");
}}
icon={HeartIcon}
title="Support Alby Hub"
description="See how you can support the development of Alby Hub"
buttonText="Become a Supporter"
buttonLink="/support-alby"
/>
);
}
}
type SidebarHintCardProps = {
title: string;
description: string | ReactElement;
buttonText: string;
buttonLink: string;
icon: LucideIcon;
onClose?: () => void;
};
function SidebarHintCard({
title,
description,
icon: Icon,
buttonText,
buttonLink,
onClose,
}: SidebarHintCardProps) {
return (
{title}
{onClose && (
)}
{description}
{buttonText}
);
}
export default SidebarHint;