mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 20:35:24 +00:00
fix other merge error and build warnings
This commit is contained in:
parent
07cafdde5a
commit
e1f7cd90ac
12 changed files with 8 additions and 13 deletions
|
|
@ -20,7 +20,6 @@ import { Separator } from "@/components/ui/separator";
|
|||
import { Schema } from "ajv";
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import useCaptureEvent from "@/hooks/useCaptureEvent";
|
||||
import { PosthogEvent, PosthogEventMap } from "@/lib/posthogEvents";
|
||||
import { CodeHostType } from "@/lib/utils";
|
||||
export type QuickActionFn<T> = (previous: T) => T;
|
||||
export type QuickAction<T> = {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import { GitHubLogoIcon, DiscordLogoIcon } from "@radix-ui/react-icons";
|
|||
import { redirect } from "next/navigation";
|
||||
import { OrgSelector } from "./orgSelector";
|
||||
import { getSubscriptionData } from "@/actions";
|
||||
import { isServiceError } from "@/lib/utils";
|
||||
import { ErrorNavIndicator } from "./errorNavIndicator";
|
||||
import { WarningNavIndicator } from "./warningNavIndicator";
|
||||
import { ProgressNavIndicator } from "./progressNavIndicator";
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function ConfigSettingInternal<T>({
|
|||
return checkIfSecretExists(secretKey, domain);
|
||||
}, { message: "Secret not found" })
|
||||
});
|
||||
}, [schema]);
|
||||
}, [schema, domain]);
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
|
|
@ -227,6 +227,7 @@ function ConfigSettingInternal<T>({
|
|||
<FormControl>
|
||||
<ConfigEditor<T>
|
||||
ref={editorRef}
|
||||
type={type}
|
||||
value={value}
|
||||
onChange={onConfigChange}
|
||||
schema={schema}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export const DeleteConnectionSetting = ({
|
|||
.finally(() => {
|
||||
setIsLoading(false);
|
||||
});
|
||||
}, [connectionId, domain, router, toast]);
|
||||
}, [connectionId, domain, router, toast, captureEvent]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col w-full bg-background border rounded-lg p-6">
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ interface ConnectCodeHostProps {
|
|||
export const ConnectCodeHost = ({ nextStep }: ConnectCodeHostProps) => {
|
||||
const [selectedCodeHost, setSelectedCodeHost] = useState<CodeHostType | null>(null);
|
||||
const router = useRouter();
|
||||
const captureEvent = useCaptureEvent();
|
||||
const onCreated = useCallback(() => {
|
||||
router.push(`?step=${nextStep}`);
|
||||
}, [nextStep, router]);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import { useToast } from "@/components/hooks/use-toast";
|
|||
import { deleteSecret } from "../../../actions"
|
||||
import { useDomain } from "@/hooks/useDomain";
|
||||
import useCaptureEvent from "@/hooks/useCaptureEvent";
|
||||
import { PosthogEvent } from "@/lib/posthogEvents";
|
||||
import { ErrorCode } from "@/lib/errorCodes";
|
||||
const formSchema = z.object({
|
||||
key: z.string().min(2).max(40),
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export function ManageSubscriptionButton({ currentUserRole }: { currentUserRole:
|
|||
router.push(session)
|
||||
captureEvent('wa_manage_subscription_button_create_portal_session_success', {})
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
captureEvent('wa_manage_subscription_button_create_portal_session_fail', {
|
||||
error: "Unknown error",
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import type { Metadata } from "next"
|
|||
import { CalendarIcon, DollarSign, Users } from "lucide-react"
|
||||
|
||||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Separator } from "@/components/ui/separator"
|
||||
import { ManageSubscriptionButton } from "./manageSubscriptionButton"
|
||||
import { getSubscriptionData, getCurrentUserRole, getSubscriptionBillingEmail } from "@/actions"
|
||||
import { isServiceError } from "@/lib/utils"
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export const MembersList = ({ members, currentUserId, currentUserRole, orgName }
|
|||
router.refresh();
|
||||
}
|
||||
});
|
||||
}, [domain, toast, router]);
|
||||
}, [domain, toast, router, captureEvent]);
|
||||
|
||||
const onTransferOwnership = useCallback((memberId: string) => {
|
||||
transferOwnership(memberId, domain)
|
||||
|
|
@ -121,7 +121,7 @@ export const MembersList = ({ members, currentUserId, currentUserRole, orgName }
|
|||
router.push("/");
|
||||
}
|
||||
});
|
||||
}, [domain, toast, router]);
|
||||
}, [domain, toast, router, captureEvent]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { LogOutIcon } from "lucide-react";
|
||||
import { signOut } from "@/auth";
|
||||
import { cn } from "@/lib/utils";
|
||||
interface LogoutEscapeHatchProps {
|
||||
className?: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export function OrgCreateForm() {
|
|||
router.push(`/${data.domain}/onboard`);
|
||||
captureEvent('wa_onboard_org_create_success', {})
|
||||
}
|
||||
}, [router, toast]);
|
||||
}, [router, toast, captureEvent]);
|
||||
|
||||
const handleNameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const name = e.target.value
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { PostHogProvider as PHProvider } from 'posthog-js/react'
|
|||
import { resolveServerPath } from './api/(client)/client'
|
||||
import { isDefined } from '@/lib/utils'
|
||||
import { usePathname, useSearchParams } from "next/navigation"
|
||||
import { useEffect, Suspense } from "react"
|
||||
import { useEffect } from "react"
|
||||
|
||||
const POSTHOG_ENABLED = isDefined(NEXT_PUBLIC_POSTHOG_PAPIK) && !NEXT_PUBLIC_SOURCEBOT_TELEMETRY_DISABLED;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue