修正評審評分清單失敗問題

This commit is contained in:
2025-09-21 01:30:26 +08:00
parent 049b53fa43
commit a36ab3c98d
17 changed files with 251 additions and 274 deletions

View File

@@ -19,12 +19,14 @@ interface ScoringLinkDialogProps {
export function ScoringLinkDialog({ open, onOpenChange, currentCompetition }: ScoringLinkDialogProps) {
const { toast } = useToast()
// 生成評分連結URL
// 根據選擇的競賽生成評分連結URL
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || (typeof window !== 'undefined' ? window.location.origin : 'http://localhost:3000')
const scoringUrl = `${baseUrl}/judge-scoring`
const scoringUrl = currentCompetition?.id
? `${baseUrl}/judge-scoring?competitionId=${currentCompetition.id}`
: `${baseUrl}/judge-scoring`
const accessCode = "judge2024"
const competitionName = currentCompetition?.name || "2024年第四季綜合AI競賽"
const competitionName = currentCompetition?.name || "未選擇競賽"
const handleCopyUrl = async () => {
try {