Skip to content

Commit dc4151f

Browse files
committed
Remove V2 countdown from sidebar
Signed-off-by: Erin Allison <[email protected]> Signed-off-by: Erin Allison <[email protected]>
1 parent 2ad664d commit dc4151f

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -92,34 +92,6 @@ type SideMenuProps = {
9292
defaultValue?: FeedbackType;
9393
};
9494

95-
function V2Countdown() {
96-
const [days, setDays] = useState(0);
97-
98-
useEffect(() => {
99-
const targetDate = new Date("2025-01-31T00:00:00Z");
100-
101-
const calculateDays = () => {
102-
const now = new Date();
103-
const difference = targetDate.getTime() - now.getTime();
104-
return Math.floor(difference / (1000 * 60 * 60 * 24));
105-
};
106-
107-
const timer = setInterval(() => {
108-
setDays(calculateDays());
109-
}, 1000 * 60 * 60); // Update every hour
110-
111-
setDays(calculateDays()); // Initial calculation
112-
113-
return () => clearInterval(timer);
114-
}, []);
115-
116-
return (
117-
<Header2 className="flex-wrap gap-4 text-error">
118-
V2 goes offline in <span className="tabular-nums">{days}d</span>
119-
</Header2>
120-
);
121-
}
122-
12395
export function SideMenu({ user, project, organization, organizations }: SideMenuProps) {
12496
const borderRef = useRef<HTMLDivElement>(null);
12597
const [showHeaderDivider, setShowHeaderDivider] = useState(false);
@@ -242,30 +214,6 @@ export function SideMenu({ user, project, organization, organizations }: SideMen
242214
/>
243215
</div>
244216
</div>
245-
<div className="m-2">
246-
{project.version === "V2" && (
247-
<div className="flex flex-col gap-3 rounded border border-error/50 bg-error/5 p-3">
248-
<V2Countdown />
249-
<Paragraph variant="small/bright">
250-
This is a v2 project. V2 will be deprecated on January 31, 2025.{" "}
251-
<TextLink
252-
className="text-text-bright underline decoration-text-dimmed underline-offset-2 transition hover:text-text-bright hover:decoration-text-bright"
253-
to="https://trigger.dev/blog/v2-end-of-life-announcement"
254-
>
255-
Learn more
256-
</TextLink>
257-
.
258-
</Paragraph>
259-
<LinkButton
260-
variant="primary/medium"
261-
to="https://trigger.dev/docs/v3/upgrading-from-v2"
262-
fullWidth
263-
>
264-
Upgrade to v3
265-
</LinkButton>
266-
</div>
267-
)}
268-
</div>
269217
<div className="flex flex-col gap-1 border-t border-grid-bright p-1">
270218
<HelpAndFeedback />
271219
{isV3Project && isFreeV3User && (

0 commit comments

Comments
 (0)