feat: add mobile application structure with emotion picker and API integration
- Added favicon and icon assets for the mobile app. - Implemented EmotionPicker component for selecting emotions with child options. - Created hooks for fetching emotions, feeds, and rapport data. - Established API service for handling requests and authentication. - Integrated Zustand for state management of user authentication. - Defined color palette for the application. - Set up TypeScript types for various entities including User, Emotion, and Feed. - Configured Babel and TypeScript for the mobile project. - Added package.json with necessary dependencies for Expo and React Native.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Plus, Edit2, Trash2, Eye, EyeOff } from 'lucide-react';
|
||||
import { Plus, Edit2, Trash2 } from 'lucide-react';
|
||||
import api from '@/lib/api';
|
||||
import type { Emotion } from '@/types';
|
||||
import Card from '@/components/ui/Card';
|
||||
@@ -81,8 +81,9 @@ export default function AdminEmotionsPage() {
|
||||
}
|
||||
setModalOpen(false);
|
||||
await fetchEmotions();
|
||||
} catch (err: any) {
|
||||
toast.error(err.response?.data?.message || 'Erreur');
|
||||
} catch (err: unknown) {
|
||||
const axiosError = err as import('axios').AxiosError<{ message?: string }>;
|
||||
toast.error(axiosError.response?.data?.message || 'Erreur');
|
||||
} finally {
|
||||
setFormLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user