mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* refactor: apply biome formatting to apps/web (batch 1) Formats apps/web non-modules directories: - apps/web/app - apps/web/lib - apps/web/pages - apps/web/styles - apps/web/server - apps/web/test - Root-level .ts and .mjs files Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/modules (batch 2) Formats smaller apps/web/modules directories: - onboarding, data-table, users, apps, auth - integration-attribute-sync, shell, availability - feature-flags, team, webhooks, getting-started - feature-opt-in, troubleshooter, schedules, notifications - signup-view.tsx Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/modules (batch 3) Formats medium apps/web/modules directories: - bookings - event-types - insights - embed Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/modules/ee (batch 4) Formats apps/web/modules/ee directory. Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web (batch 5) Formats remaining apps/web directories: - apps/web/modules/settings - apps/web/modules/booking-audit - apps/web/playwright Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to apps/web/components (batch 6) Formats remaining apps/web/components files. Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to new apps/web files from main Formats newly added/modified files from main merge: - WorkflowStepContainer.tsx (resolved merge conflicts) - Newly moved files (blocklist, form-builder, schedules, etc.) - Other files modified in main Co-Authored-By: Claude Opus 4.5 <[email protected]> * refactor: apply biome formatting to new apps/web files from main Co-Authored-By: Claude Opus 4.5 <[email protected]> --------- Co-authored-by: Claude Opus 4.5 <[email protected]> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
73 lines
2.4 KiB
TypeScript
73 lines
2.4 KiB
TypeScript
import { BookerStoreProvider } from "@calcom/features/bookings/Booker/BookerStoreProvider";
|
|
import useMediaQuery from "@calcom/lib/hooks/useMediaQuery";
|
|
import classNames from "@calcom/ui/classNames";
|
|
|
|
import { LargeCalendar } from "./LargeCalendar";
|
|
import { TroubleshooterHeader } from "./TroubleshooterHeader";
|
|
import { TroubleshooterSidebar } from "./TroubleshooterSidebar";
|
|
import { useInitalizeTroubleshooterStore } from "@calcom/features/troubleshooter/store";
|
|
import type { TroubleshooterProps } from "@calcom/features/troubleshooter/types";
|
|
|
|
const extraDaysConfig = {
|
|
desktop: 7,
|
|
tablet: 4,
|
|
};
|
|
|
|
const TroubleshooterComponent = ({ month }: TroubleshooterProps) => {
|
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
const isTablet = useMediaQuery("(max-width: 1024px)");
|
|
const extraDays = isTablet ? extraDaysConfig.tablet : extraDaysConfig.desktop;
|
|
|
|
useInitalizeTroubleshooterStore({
|
|
month: month,
|
|
});
|
|
|
|
return (
|
|
<>
|
|
<div
|
|
className={classNames(
|
|
"text-default flex min-h-full w-full flex-col items-center overflow-clip",
|
|
isMobile
|
|
? "[--troublehooster-meta-width:0px]"
|
|
: "[--troublehooster-meta-width:250px] lg:[--troubleshooter-meta-width:430px]"
|
|
)}>
|
|
<div
|
|
style={{
|
|
display: "grid",
|
|
width: "100vw",
|
|
minHeight: "100vh",
|
|
height: "auto",
|
|
gridTemplateAreas: `
|
|
"meta header header"
|
|
"meta main main"
|
|
`,
|
|
gridTemplateColumns: "var(--troubleshooter-meta-width) 1fr",
|
|
gridTemplateRows: "70px auto",
|
|
}}
|
|
className={classNames(
|
|
"bg-default dark:bg-cal-muted text-default flex min-h-full w-full flex-col items-center sm:transition-[width] sm:duration-300"
|
|
)}>
|
|
<div className="bg-default dark:bg-cal-muted sticky top-0 z-10 [grid-area:header]">
|
|
<TroubleshooterHeader extraDays={extraDays} isMobile={isMobile} />
|
|
</div>
|
|
<div className="sticky top-0 z-10 ps-6">
|
|
<TroubleshooterSidebar />
|
|
</div>
|
|
|
|
<div className="ml[-1px] border-subtle sticky top-0 [grid-area:main]">
|
|
<LargeCalendar extraDays={extraDays} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export const Troubleshooter = ({ month }: TroubleshooterProps) => {
|
|
return (
|
|
<BookerStoreProvider>
|
|
<TroubleshooterComponent month={month} />
|
|
</BookerStoreProvider>
|
|
);
|
|
};
|