chore: linting and formatting

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-09-28 22:26:26 -07:00
parent ef361e16b4
commit 94367e4226
16 changed files with 143 additions and 131 deletions

View file

@ -53,7 +53,7 @@ const getConnectorTypeDisplay = (type: string): string => {
GOOGLE_CALENDAR_CONNECTOR: "Google Calendar Connector",
GOOGLE_GMAIL_CONNECTOR: "Google Gmail Connector",
AIRTABLE_CONNECTOR: "Airtable Connector",
LUMA_CONNECTOR: "Luma Connector"
LUMA_CONNECTOR: "Luma Connector",
// Add other connector types here as needed
};
return typeMap[type] || type;
@ -72,7 +72,7 @@ const getApiKeyFieldName = (connectorType: string): string => {
GITHUB_CONNECTOR: "GITHUB_PAT",
DISCORD_CONNECTOR: "DISCORD_BOT_TOKEN",
LINKUP_API: "LINKUP_API_KEY",
LUMA_CONNECTOR: "LUMA_API_KEY"
LUMA_CONNECTOR: "LUMA_API_KEY",
};
return fieldMap[connectorType] || "";
};

View file

@ -54,7 +54,7 @@ export default function LumaConnectorPage() {
const searchSpaceId = params.search_space_id as string;
const [isSubmitting, setIsSubmitting] = useState(false);
const [doesConnectorExist, setDoesConnectorExist] = useState(false);
const { fetchConnectors, createConnector } = useSearchSourceConnectors();
// Initialize the form
@ -69,8 +69,7 @@ export default function LumaConnectorPage() {
useEffect(() => {
fetchConnectors().then((data) => {
const connector = data.find(
(c: SearchSourceConnector) =>
c.connector_type === EnumConnectorName.LUMA_CONNECTOR
(c: SearchSourceConnector) => c.connector_type === EnumConnectorName.LUMA_CONNECTOR
);
if (connector) {
setDoesConnectorExist(true);
@ -86,14 +85,14 @@ export default function LumaConnectorPage() {
name: values.name,
connector_type: EnumConnectorName.LUMA_CONNECTOR,
config: {
LUMA_API_KEY: values.api_key
LUMA_API_KEY: values.api_key,
},
is_indexable: true,
last_indexed_at: null,
});
toast.success("Luma connector created successfully!");
// Navigate back to connectors page
router.push(`/dashboard/${searchSpaceId}/connectors`);
} catch (error) {
@ -126,9 +125,7 @@ export default function LumaConnectorPage() {
</div>
<div>
<h1 className="text-3xl font-bold tracking-tight">Connect Luma</h1>
<p className="text-muted-foreground">
Connect your Luma account to search events.
</p>
<p className="text-muted-foreground">Connect your Luma account to search events.</p>
</div>
</div>
</div>
@ -170,11 +167,7 @@ export default function LumaConnectorPage() {
<FormItem>
<FormLabel>API Key</FormLabel>
<FormControl>
<Input
type="password"
placeholder="Enter your Luma API key"
{...field}
/>
<Input type="password" placeholder="Enter your Luma API key" {...field} />
</FormControl>
<FormDescription>
Your API key will be encrypted and stored securely.

View file

@ -146,7 +146,7 @@ const connectorCategories: ConnectorCategory[] = [
description: "Connect to Luma to search events",
icon: getConnectorIcon(EnumConnectorName.LUMA_CONNECTOR, "h-6 w-6"),
status: "available",
}
},
],
},
{

View file

@ -43,6 +43,6 @@ export const editConnectorSchema = z.object({
GOOGLE_CALENDAR_CLIENT_SECRET: z.string().optional(),
GOOGLE_CALENDAR_REFRESH_TOKEN: z.string().optional(),
GOOGLE_CALENDAR_CALENDAR_IDS: z.string().optional(),
LUMA_API_KEY: z.string().optional()
LUMA_API_KEY: z.string().optional(),
});
export type EditConnectorFormValues = z.infer<typeof editConnectorSchema>;

View file

@ -13,5 +13,5 @@ export enum EnumConnectorName {
GOOGLE_CALENDAR_CONNECTOR = "GOOGLE_CALENDAR_CONNECTOR",
GOOGLE_GMAIL_CONNECTOR = "GOOGLE_GMAIL_CONNECTOR",
AIRTABLE_CONNECTOR = "AIRTABLE_CONNECTOR",
LUMA_CONNECTOR = "LUMA_CONNECTOR"
LUMA_CONNECTOR = "LUMA_CONNECTOR",
}

View file

@ -10,10 +10,10 @@ import {
IconLayoutKanban,
IconLinkPlus,
IconMail,
IconSparkles,
IconTable,
IconTicket,
IconWorldWww,
IconSparkles,
} from "@tabler/icons-react";
import { File, Globe, Link, Microscope, Search, Sparkles, Telescope, Webhook } from "lucide-react";
import { EnumConnectorName } from "./connector";

View file

@ -52,7 +52,7 @@ export function useConnectorEditPage(connectorId: number, searchSpaceId: string)
JIRA_BASE_URL: "",
JIRA_EMAIL: "",
JIRA_API_TOKEN: "",
LUMA_API_KEY: ""
LUMA_API_KEY: "",
},
});
@ -79,7 +79,7 @@ export function useConnectorEditPage(connectorId: number, searchSpaceId: string)
JIRA_BASE_URL: config.JIRA_BASE_URL || "",
JIRA_EMAIL: config.JIRA_EMAIL || "",
JIRA_API_TOKEN: config.JIRA_API_TOKEN || "",
LUMA_API_KEY: config.LUMA_API_KEY || ""
LUMA_API_KEY: config.LUMA_API_KEY || "",
});
if (currentConnector.connector_type === "GITHUB_CONNECTOR") {
const savedRepos = config.repo_full_names || [];
@ -312,7 +312,7 @@ export function useConnectorEditPage(connectorId: number, searchSpaceId: string)
setIsSaving(false);
return;
}
newConfig = { LUMA_API_KEY: formData.LUMA_API_KEY};
newConfig = { LUMA_API_KEY: formData.LUMA_API_KEY };
}
break;
}

View file

@ -15,7 +15,7 @@ export const getConnectorTypeDisplay = (type: string): string => {
GOOGLE_CALENDAR_CONNECTOR: "Google Calendar",
GOOGLE_GMAIL_CONNECTOR: "Google Gmail",
AIRTABLE_CONNECTOR: "Airtable",
LUMA_CONNECTOR: "Luma"
LUMA_CONNECTOR: "Luma",
};
return typeMap[type] || type;
};