實現完整的後台得獎資訊
This commit is contained in:
27
app/page.tsx
27
app/page.tsx
@@ -185,6 +185,13 @@ export default function AIShowcasePlatform() {
|
||||
)
|
||||
const [showAwardDetail, setShowAwardDetail] = useState(false)
|
||||
const [selectedAward, setSelectedAward] = useState<any>(null)
|
||||
|
||||
// 添加頁面調試資訊
|
||||
console.log('🏠 主頁面渲染:', {
|
||||
awardsCount: awards.length,
|
||||
selectedAward: selectedAward ? selectedAward.id : null,
|
||||
showAwardDetail
|
||||
});
|
||||
|
||||
// 載入應用數據
|
||||
const loadApps = async () => {
|
||||
@@ -418,6 +425,14 @@ export default function AIShowcasePlatform() {
|
||||
}
|
||||
|
||||
const handleShowAwardDetail = (award: any) => {
|
||||
console.log('🎯 handleShowAwardDetail 被調用:', {
|
||||
award: award ? {
|
||||
id: award.id,
|
||||
competitionId: award.competitionId,
|
||||
awardName: award.awardName,
|
||||
hasCompetitionId: !!award.competitionId
|
||||
} : null
|
||||
});
|
||||
setSelectedAward(award)
|
||||
setShowAwardDetail(true)
|
||||
}
|
||||
@@ -931,7 +946,17 @@ export default function AIShowcasePlatform() {
|
||||
|
||||
{/* Award Detail Dialog */}
|
||||
{selectedAward && (
|
||||
<AwardDetailDialog open={showAwardDetail} onOpenChange={setShowAwardDetail} award={selectedAward} />
|
||||
<>
|
||||
{console.log('🎯 渲染 AwardDetailDialog:', {
|
||||
selectedAward: selectedAward ? {
|
||||
id: selectedAward.id,
|
||||
competitionId: selectedAward.competitionId,
|
||||
awardName: selectedAward.awardName
|
||||
} : null,
|
||||
showAwardDetail
|
||||
})}
|
||||
<AwardDetailDialog open={showAwardDetail} onOpenChange={setShowAwardDetail} award={selectedAward} />
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
|
Reference in New Issue
Block a user