feat: conditionally render TimeBadge based on cloud status

- Updated the ShowProjects and side layout components to only display the TimeBadge when not in cloud mode.
- Modified the TimeBadge component to remove the refetch interval for server time when in cloud mode, returning null instead.
- Enhanced the server API to return null for server time in cloud environments, improving performance and avoiding unnecessary queries.
This commit is contained in:
Mauricio Siu
2025-11-16 21:32:23 -06:00
parent f5891b8793
commit 1581defc39
4 changed files with 13 additions and 9 deletions
@@ -384,6 +384,9 @@ export const serverRouter = createTRPCRouter({
return ip;
}),
getServerTime: protectedProcedure.query(() => {
if (IS_CLOUD) {
return null;
}
return {
time: new Date(),
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,