Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions apps/webapp/app/components/navigation/SideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,34 +90,6 @@ type SideMenuProps = {
defaultValue?: FeedbackType;
};

function V2Countdown() {
const [days, setDays] = useState(0);

useEffect(() => {
const targetDate = new Date("2025-01-31T00:00:00Z");

const calculateDays = () => {
const now = new Date();
const difference = targetDate.getTime() - now.getTime();
return Math.floor(difference / (1000 * 60 * 60 * 24));
};

const timer = setInterval(() => {
setDays(calculateDays());
}, 1000 * 60 * 60); // Update every hour

setDays(calculateDays()); // Initial calculation

return () => clearInterval(timer);
}, []);

return (
<Header2 className="flex-wrap gap-4 text-error">
V2 goes offline in <span className="tabular-nums">{days}d</span>
</Header2>
);
}

export function SideMenu({ user, project, organization, organizations }: SideMenuProps) {
const borderRef = useRef<HTMLDivElement>(null);
const [showHeaderDivider, setShowHeaderDivider] = useState(false);
Expand Down Expand Up @@ -240,30 +212,6 @@ export function SideMenu({ user, project, organization, organizations }: SideMen
/>
</div>
</div>
<div className="m-2">
{project.version === "V2" && (
<div className="flex flex-col gap-3 rounded border border-error/50 bg-error/5 p-3">
<V2Countdown />
<Paragraph variant="small/bright">
This is a v2 project. V2 will be deprecated on January 31, 2025.{" "}
<TextLink
className="text-text-bright underline decoration-text-dimmed underline-offset-2 transition hover:text-text-bright hover:decoration-text-bright"
to="https://trigger.dev/blog/v2-end-of-life-announcement"
>
Learn more
</TextLink>
.
</Paragraph>
<LinkButton
variant="primary/medium"
to="https://trigger.dev/docs/v3/upgrading-from-v2"
fullWidth
>
Upgrade to v3
</LinkButton>
</div>
)}
</div>
<div className="flex flex-col gap-1 border-t border-grid-bright p-1">
<HelpAndFeedback />
{isV3Project && isFreeV3User && (
Expand Down
Loading