Update frontend/src/components/Panel.jsx
Browse files
frontend/src/components/Panel.jsx
CHANGED
|
@@ -9,20 +9,19 @@ const Panel = ({
|
|
| 9 |
onToggleCollapse,
|
| 10 |
isCollapsed,
|
| 11 |
onNewChat,
|
| 12 |
-
userName,
|
| 13 |
-
onLogout
|
| 14 |
}) => {
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
-
// Fonctions existantes
|
| 19 |
const createNewChat = () => {
|
| 20 |
onNewChat();
|
| 21 |
};
|
| 22 |
|
| 23 |
const deleteConversation = async (conversationId) => {
|
| 24 |
try {
|
| 25 |
-
const response = await fetch(
|
| 26 |
method: 'DELETE',
|
| 27 |
credentials: 'include',
|
| 28 |
});
|
|
|
|
| 9 |
onToggleCollapse,
|
| 10 |
isCollapsed,
|
| 11 |
onNewChat,
|
| 12 |
+
userName,
|
| 13 |
+
onLogout
|
| 14 |
}) => {
|
| 15 |
|
| 16 |
|
| 17 |
|
|
|
|
| 18 |
const createNewChat = () => {
|
| 19 |
onNewChat();
|
| 20 |
};
|
| 21 |
|
| 22 |
const deleteConversation = async (conversationId) => {
|
| 23 |
try {
|
| 24 |
+
const response = await fetch(`/api/conversations/${conversationId}`, {
|
| 25 |
method: 'DELETE',
|
| 26 |
credentials: 'include',
|
| 27 |
});
|