mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Fix type errors
This commit is contained in:
7 files changed
+121
-100
No files matched your search
@@ -2,7 +2,6 @@ import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Rocket, ChevronDown } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { ExternalInput } from '@/components/ui/external-input';
|
||||
import {
|
||||
Dialog,
|
||||
@@ -54,21 +53,6 @@ interface AddProviderDialogProps {
|
||||
onAdd: (apiKey: string, accountId?: string, organizationId?: string) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize a URL string to ensure it has a protocol
|
||||
* @param url - The URL string to normalize
|
||||
* @returns A fully-qualified URL string
|
||||
*/
|
||||
function normalizeUrl(url: string): string {
|
||||
// If it already has a protocol, return as-is
|
||||
if (/^https?:\/\//i.test(url)) {
|
||||
return url;
|
||||
}
|
||||
|
||||
// Add https:// prefix
|
||||
return `https://${url}`;
|
||||
}
|
||||
|
||||
function getProviderUrl(preset: PresetProvider): string | null {
|
||||
switch (preset.type) {
|
||||
case 'shakespeare':
|
||||
|
||||
Reference in new issue
Block a user