diff --git a/src/components/jira/JiraLogs.tsx b/src/components/jira/JiraLogs.tsx
index 7f33836..9b4f67e 100644
--- a/src/components/jira/JiraLogs.tsx
+++ b/src/components/jira/JiraLogs.tsx
@@ -126,7 +126,10 @@ export function JiraLogs({ className = '' }: JiraLogsProps) {
>
{getStatusBadge(log.status)}
-
+
{formatDistanceToNow(parseDate(log.createdAt), {
addSuffix: true,
locale: fr,
diff --git a/src/components/notes/MarkdownEditor.tsx b/src/components/notes/MarkdownEditor.tsx
index 8df156b..a51a7cf 100644
--- a/src/components/notes/MarkdownEditor.tsx
+++ b/src/components/notes/MarkdownEditor.tsx
@@ -305,9 +305,9 @@ export function MarkdownEditor({
return () => document.removeEventListener('keydown', handleKeyDown);
}, [handleKeyDown]);
- // Auto-save
+ // Auto-save (uniquement en mode édition)
useEffect(() => {
- if (autoSave && hasUnsavedChanges) {
+ if (autoSave && hasUnsavedChanges && isEditing) {
if (autoSaveTimeoutRef.current) {
clearTimeout(autoSaveTimeoutRef.current);
}
@@ -322,7 +322,7 @@ export function MarkdownEditor({
}
};
}
- }, [value, autoSave, hasUnsavedChanges, handleSave]);
+ }, [value, autoSave, hasUnsavedChanges, isEditing, handleSave]);
// Détecter les changements
useEffect(() => {
diff --git a/src/components/notes/NotesList.tsx b/src/components/notes/NotesList.tsx
index baf5bf5..9335327 100644
--- a/src/components/notes/NotesList.tsx
+++ b/src/components/notes/NotesList.tsx
@@ -202,7 +202,7 @@ export function NotesList({
-
+
{formatDistanceToNow(new Date(note.updatedAt), {
addSuffix: true,
locale: fr,
diff --git a/src/lib/auth.ts b/src/lib/auth.ts
index 3441502..f4097b0 100644
--- a/src/lib/auth.ts
+++ b/src/lib/auth.ts
@@ -3,6 +3,7 @@ import CredentialsProvider from 'next-auth/providers/credentials';
import { usersService } from '@/services/users';
export const authOptions: NextAuthOptions = {
+ secret: process.env.NEXTAUTH_SECRET,
providers: [
CredentialsProvider({
name: 'credentials',