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