fix: resolve lint warnings in web app (#26017)
* fix: resolve lint warnings in web app Co-Authored-By: [email protected] <[email protected]> * fix: remove unused isReadPermission variable Co-Authored-By: [email protected] <[email protected]> * fix: remove unused loading state entirely Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
f7bb2683cb
commit
09f2aa113b
7 files changed
+5
-11
No files matched your search
@@ -29,7 +29,6 @@ export default async function PageWrapperLayout({ children }: { children: React.
|
|||||||
key={script.id}
|
key={script.id}
|
||||||
nonce={nonce}
|
nonce={nonce}
|
||||||
id={script.id}
|
id={script.id}
|
||||||
// eslint-disable-next-line react/no-danger
|
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: script.script,
|
__html: script.script,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { createRouterCaller } from "app/_trpc/context";
|
|
||||||
import { _generateMetadata } from "app/_utils";
|
import { _generateMetadata } from "app/_utils";
|
||||||
import { cookies, headers } from "next/headers";
|
import { cookies, headers } from "next/headers";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { APP_NAME } from "@calcom/lib/constants";
|
|||||||
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
import { buildLegacyRequest } from "@lib/buildLegacyCtx";
|
||||||
|
|
||||||
import { TeamInviteEmailView } from "~/onboarding/teams/invite/email/team-invite-email-view";
|
import { TeamInviteEmailView } from "~/onboarding/teams/invite/email/team-invite-email-view";
|
||||||
import { TeamInviteView } from "~/onboarding/teams/invite/team-invite-view";
|
|
||||||
|
|
||||||
export const generateMetadata = async () => {
|
export const generateMetadata = async () => {
|
||||||
return await _generateMetadata(
|
return await _generateMetadata(
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ const fetchReferralsToken = async () => {
|
|||||||
// The enabled referrals page implementation
|
// The enabled referrals page implementation
|
||||||
export const DubReferralsPage = () => {
|
export const DubReferralsPage = () => {
|
||||||
const [token, setToken] = useState<string | null>(null);
|
const [token, setToken] = useState<string | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
|
||||||
const { t } = useLocale();
|
const { t } = useLocale();
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
|
|
||||||
@@ -42,13 +41,11 @@ export const DubReferralsPage = () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Error fetching referrals token:", err);
|
console.error("Error fetching referrals token:", err);
|
||||||
showToast(t("unexpected_error_try_again"), "error");
|
showToast(t("unexpected_error_try_again"), "error");
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
getToken();
|
getToken();
|
||||||
}, []);
|
}, [t]);
|
||||||
|
|
||||||
if (!IS_DUB_REFERRALS_ENABLED || !token) {
|
if (!IS_DUB_REFERRALS_ENABLED || !token) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
-1
@@ -139,7 +139,6 @@ export function AdvancedPermissionGroup({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isChecked = selectedPermissions.includes(permission);
|
const isChecked = selectedPermissions.includes(permission);
|
||||||
const isReadPermission = action === CrudAction.Read;
|
|
||||||
const isAutoEnabled = isReadAutoEnabled(action);
|
const isAutoEnabled = isReadAutoEnabled(action);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
+3
-3
@@ -6,7 +6,7 @@ import { useState, useMemo, useEffect } from "react";
|
|||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import type { Resource } from "@calcom/features/pbac/domain/types/permission-registry";
|
import type { Resource, PermissionString } from "@calcom/features/pbac/domain/types/permission-registry";
|
||||||
import {
|
import {
|
||||||
CrudAction,
|
CrudAction,
|
||||||
Scope,
|
Scope,
|
||||||
@@ -160,7 +160,7 @@ export function RoleSheet({
|
|||||||
teamId,
|
teamId,
|
||||||
roleId: role.id,
|
roleId: role.id,
|
||||||
name: values.name,
|
name: values.name,
|
||||||
permissions: values.permissions as any,
|
permissions: values.permissions as PermissionString[],
|
||||||
color: values.color,
|
color: values.color,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -169,7 +169,7 @@ export function RoleSheet({
|
|||||||
name: values.name,
|
name: values.name,
|
||||||
description: values.description,
|
description: values.description,
|
||||||
color: values.color,
|
color: values.color,
|
||||||
permissions: values.permissions as any,
|
permissions: values.permissions as PermissionString[],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -489,3 +489,4 @@ describe("Booking Audit Integration", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Reference in new issue
Block a user