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