fix: extract shared types to non-React modules to fix circular dependencies (#26083)
- Move InvalidAppCredentialBannerProps to packages/features/users/types/invalidAppCredentials.ts - Add WorkflowListType to packages/features/ee/workflows/lib/types.ts - Update server file imports to use new type locations - Update React component imports to re-export from new locations This fixes circular dependencies where server files were importing from React component modules that import from @calcom/trpc, creating: server -> component -> @calcom/trpc -> react -> server (circular) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
9ae2381755
commit
825f55c0a1
6 files changed
+49
-43
No files matched your search
@@ -4,6 +4,8 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { type RouterOutputs } from "@calcom/trpc";
|
||||
import { TopBanner } from "@calcom/ui/components/top-banner";
|
||||
|
||||
import { type InvalidAppCredentialBannerProps } from "../types/invalidAppCredentials";
|
||||
|
||||
export type InvalidAppCredentialBannersProps = {
|
||||
data: RouterOutputs["viewer"]["me"]["getUserTopBanners"]["invalidAppCredentialBanners"];
|
||||
};
|
||||
@@ -22,10 +24,7 @@ export function InvalidAppCredentialBanners({ data }: InvalidAppCredentialBanner
|
||||
);
|
||||
}
|
||||
|
||||
export type InvalidAppCredentialBannerProps = {
|
||||
name: string;
|
||||
slug: string;
|
||||
};
|
||||
export type { InvalidAppCredentialBannerProps };
|
||||
|
||||
export function InvalidAppCredentialBanner({ name, slug }: InvalidAppCredentialBannerProps) {
|
||||
const { t } = useLocale();
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export type InvalidAppCredentialBannerProps = {
|
||||
name: string;
|
||||
slug: string;
|
||||
};
|
||||
Reference in new issue
Block a user