Build fixes: offline-safe fonts, Next.js API route type updates, TS strict errors resolved, MUI import cleanup, chat markdown wrapper, Azure OpenAI typing, caching key + chapter API id types, and misc error-logging typings.
This commit is contained in:
@@ -4,18 +4,7 @@ import React, { createContext, useContext, useEffect, useState, ReactNode } from
|
||||
import { useLocale } from 'next-intl'
|
||||
import { useStore } from '@/lib/store'
|
||||
import { isTokenExpired, clearExpiredToken } from '@/lib/auth/client'
|
||||
|
||||
interface User {
|
||||
id: string
|
||||
email: string
|
||||
name?: string
|
||||
role: string
|
||||
theme: string
|
||||
fontSize: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
lastLoginAt?: Date
|
||||
}
|
||||
import type { User } from '@/types'
|
||||
|
||||
interface AuthContextType {
|
||||
user: User | null
|
||||
@@ -313,4 +302,4 @@ export function useAuth(): AuthContextType {
|
||||
throw new Error('useAuth must be used within an AuthProvider')
|
||||
}
|
||||
return context
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,9 +84,11 @@ export function ChatInterface() {
|
||||
}`}
|
||||
>
|
||||
{msg.role === 'assistant' ? (
|
||||
<ReactMarkdown className="prose prose-sm max-w-none">
|
||||
{msg.content}
|
||||
</ReactMarkdown>
|
||||
<div className="prose prose-sm max-w-none">
|
||||
<ReactMarkdown>
|
||||
{msg.content}
|
||||
</ReactMarkdown>
|
||||
</div>
|
||||
) : (
|
||||
<p>{msg.content}</p>
|
||||
)}
|
||||
@@ -129,4 +131,4 @@ export function ChatInterface() {
|
||||
</form>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user