This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor: update collection edit page to use API client and remove @tabler/icons-react

Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>

+11 -14
+11 -14
src/webapp/app/(authenticated)/collections/[collectionId]/edit/page.tsx
··· 14 14 Alert, 15 15 LoadingOverlay, 16 16 } from '@mantine/core'; 17 - import { IconAlertCircle, IconCheck } from '@tabler/icons-react'; 18 - import { useApiClient } from '@/hooks/useApiClient'; 17 + import { getAccessToken } from '@/services/auth'; 18 + import { ApiClient } from '@/api-client/ApiClient'; 19 19 import type { GetCollectionPageResponse } from '@/api-client/types'; 20 20 21 21 export default function EditCollectionPage() { 22 22 const router = useRouter(); 23 23 const params = useParams(); 24 - const apiClient = useApiClient(); 25 24 const collectionId = params.collectionId as string; 25 + 26 + // Create API client instance 27 + const apiClient = new ApiClient( 28 + process.env.NEXT_PUBLIC_API_BASE_URL || 'http://localhost:3000', 29 + () => getAccessToken(), 30 + ); 26 31 27 32 const [collection, setCollection] = 28 33 useState<GetCollectionPageResponse | null>(null); ··· 100 105 if (!collection) { 101 106 return ( 102 107 <Container size="md" py="xl"> 103 - <Alert icon={<IconAlertCircle size="1rem" />} color="red"> 104 - Collection not found 105 - </Alert> 108 + <Alert color="red" title="Collection not found" /> 106 109 </Container> 107 110 ); 108 111 } ··· 114 117 115 118 <Card withBorder p="lg"> 116 119 <Stack gap="md"> 117 - {error && ( 118 - <Alert icon={<IconAlertCircle size="1rem" />} color="red"> 119 - {error} 120 - </Alert> 121 - )} 120 + {error && <Alert color="red" title={error} />} 122 121 123 122 {success && ( 124 - <Alert icon={<IconCheck size="1rem" />} color="green"> 125 - Collection updated successfully! Redirecting... 126 - </Alert> 123 + <Alert color="green" title="Collection updated successfully! Redirecting..." /> 127 124 )} 128 125 129 126 <TextInput