Spaces:
Sleeping
Sleeping
Đỗ Hải Nam commited on
Commit ·
c107c22
1
Parent(s): 9bd51ef
change hardcoded url
Browse files
frontend/src/App.jsx
CHANGED
|
@@ -8,7 +8,7 @@ import { Menu, MoreHorizontal } from 'lucide-react'
|
|
| 8 |
import './App.css'
|
| 9 |
import GuideTour from './components/GuideTour'
|
| 10 |
|
| 11 |
-
const API_BASE = '
|
| 12 |
|
| 13 |
function App() {
|
| 14 |
// --- State Management ---
|
|
|
|
| 8 |
import './App.css'
|
| 9 |
import GuideTour from './components/GuideTour'
|
| 10 |
|
| 11 |
+
const API_BASE = '/api'
|
| 12 |
|
| 13 |
function App() {
|
| 14 |
// --- State Management ---
|
frontend/src/components/ChatInput.jsx
CHANGED
|
@@ -273,7 +273,7 @@ const ChatInput = ({ onSendMessage, isLoading, onImageClick }) => {
|
|
| 273 |
</div>
|
| 274 |
|
| 275 |
<p className="input-hint">
|
| 276 |
-
|
| 277 |
</p>
|
| 278 |
</div>
|
| 279 |
)
|
|
|
|
| 273 |
</div>
|
| 274 |
|
| 275 |
<p className="input-hint">
|
| 276 |
+
Pochi không phải lúc nào cũng đúng. Hãy tập thói quen double check nhé!
|
| 277 |
</p>
|
| 278 |
</div>
|
| 279 |
)
|
frontend/src/components/MessageList.jsx
CHANGED
|
@@ -374,7 +374,7 @@ const MessageList = ({
|
|
| 374 |
</div>
|
| 375 |
</div>
|
| 376 |
<h2>Xin chào, tôi có thể giúp gì?</h2>
|
| 377 |
-
<p>Tôi là
|
| 378 |
<div className="example-prompts">
|
| 379 |
<button onClick={() => onExampleClick('Tính đạo hàm của hàm số y = x³ - 3x + 2')}>Tính đạo hàm của hàm số y = x³ - 3x + 2</button>
|
| 380 |
<button onClick={() => onExampleClick('Tính tích phân của hàm số f(x) = sin(x) từ 0 đến π')}>Tính tích phân của hàm số f(x) = sin(x) từ 0 đến π</button>
|
|
|
|
| 374 |
</div>
|
| 375 |
</div>
|
| 376 |
<h2>Xin chào, tôi có thể giúp gì?</h2>
|
| 377 |
+
<p>Tôi là Pochi, bạn đồng hành của bạn trong việc chinh phục môn toán giải tích.<br />Hãy bắt đầu bằng việc đặt câu hỏi cho tôi nhé!</p>
|
| 378 |
<div className="example-prompts">
|
| 379 |
<button onClick={() => onExampleClick('Tính đạo hàm của hàm số y = x³ - 3x + 2')}>Tính đạo hàm của hàm số y = x³ - 3x + 2</button>
|
| 380 |
<button onClick={() => onExampleClick('Tính tích phân của hàm số f(x) = sin(x) từ 0 đến π')}>Tính tích phân của hàm số f(x) = sin(x) từ 0 đến π</button>
|
frontend/src/components/Modals.jsx
CHANGED
|
@@ -26,7 +26,7 @@ export const SearchModal = ({ onSelect, onClose, conversations = [], isRestored
|
|
| 26 |
const fetchResults = async () => {
|
| 27 |
setIsLoading(true)
|
| 28 |
try {
|
| 29 |
-
const res = await fetch(`
|
| 30 |
if (res.ok) {
|
| 31 |
const data = await res.json()
|
| 32 |
setResults(data)
|
|
|
|
| 26 |
const fetchResults = async () => {
|
| 27 |
setIsLoading(true)
|
| 28 |
try {
|
| 29 |
+
const res = await fetch(`/api/search?q=${encodeURIComponent(debouncedQuery)}`)
|
| 30 |
if (res.ok) {
|
| 31 |
const data = await res.json()
|
| 32 |
setResults(data)
|