Skip to content

Commit b4d1619

Browse files
erin-allisonsamejr
andauthored
Remove V2 countdown from sidebar (#1712)
Signed-off-by: Erin Allison <[email protected]> Signed-off-by: Erin Allison <[email protected]> Co-authored-by: James Ritchie <[email protected]>
1 parent 1e194a5 commit b4d1619

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
@@ -90,34 +90,6 @@ type SideMenuProps = {
9090
defaultValue?: FeedbackType;
9191
};
9292

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

0 commit comments

Comments
 (0)