修正完成日期時間格式
This commit is contained in:
@@ -243,7 +243,7 @@ export default function CombinedResultsPage() {
|
||||
<div>
|
||||
<h1 className="text-xl font-bold text-foreground">綜合能力測試結果</h1>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
完成時間:{new Date(results.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
|
||||
完成時間:{new Date(results.completedAt).toLocaleString("zh-TW")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -41,8 +41,9 @@ export default function CreativeResultsPage() {
|
||||
const data = await response.json()
|
||||
|
||||
if (data.success && data.data.length > 0) {
|
||||
// 取最新的結果
|
||||
const latestResult = data.data[0]
|
||||
// 按創建時間排序,取最新的結果
|
||||
const sortedResults = data.data.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))
|
||||
const latestResult = sortedResults[0]
|
||||
|
||||
// 獲取題目資料來計算各維度分數
|
||||
const questionsResponse = await fetch('/api/creative-questions')
|
||||
@@ -263,7 +264,7 @@ export default function CreativeResultsPage() {
|
||||
<div>
|
||||
<h1 className="text-xl font-bold text-foreground">創意能力測試結果</h1>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
完成時間:{new Date(results.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
|
||||
完成時間:{new Date(results.completedAt).toLocaleString("zh-TW")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -138,7 +138,7 @@ export default function LogicResultsPage() {
|
||||
<div>
|
||||
<h1 className="text-xl font-bold text-foreground">邏輯思維測試結果</h1>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
完成時間:{new Date(results.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
|
||||
完成時間:{new Date(results.completedAt).toLocaleString("zh-TW")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -264,7 +264,7 @@ function ResultsContent() {
|
||||
<div className="min-w-0 flex-1">
|
||||
<h3 className="font-medium text-foreground">{testInfo.name}</h3>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
完成時間:{new Date(result.completedAt).toLocaleString("zh-TW", { timeZone: "Asia/Taipei" })}
|
||||
完成時間:{new Date(result.completedAt).toLocaleString("zh-TW")}
|
||||
</p>
|
||||
{result.testCount && result.testCount > 1 && (
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
|
Reference in New Issue
Block a user