修正邀請碼問題
This commit is contained in:
@@ -2336,7 +2336,8 @@ export function CompetitionManagement() {
|
||||
})
|
||||
}
|
||||
|
||||
const judgeScoringUrl = typeof window !== "undefined" ? `${window.location.origin}/judge-scoring` : "/judge-scoring"
|
||||
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || (typeof window !== "undefined" ? window.location.origin : 'http://localhost:3000')
|
||||
const judgeScoringUrl = `${baseUrl}/judge-scoring`
|
||||
|
||||
// Filter out proposal competitions from display
|
||||
const displayCompetitions = competitions.filter((competition) => competition.type !== "proposal")
|
||||
|
@@ -20,9 +20,8 @@ export function ScoringLinkDialog({ open, onOpenChange, currentCompetition }: Sc
|
||||
const { toast } = useToast()
|
||||
|
||||
// 生成評分連結URL
|
||||
const scoringUrl = typeof window !== 'undefined'
|
||||
? `${window.location.origin}/judge-scoring`
|
||||
: "https://preview-fork-of-ai-app-design-ieqe9ld0z64vdugqt.vusercontent.net/judge-scoring"
|
||||
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || (typeof window !== 'undefined' ? window.location.origin : 'http://localhost:3000')
|
||||
const scoringUrl = `${baseUrl}/judge-scoring`
|
||||
|
||||
const accessCode = "judge2024"
|
||||
const competitionName = currentCompetition?.name || "2024年第四季綜合AI競賽"
|
||||
|
@@ -457,9 +457,8 @@ export function UserManagement() {
|
||||
const newToken = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15)
|
||||
const user = users.find((u) => u.id === userId)
|
||||
const role = (user as any)?.invitedRole || "user"
|
||||
const newInvitationLink = isClient
|
||||
? `${window.location.origin}/register?token=${newToken}&email=${encodeURIComponent(email)}&role=${role}`
|
||||
: `/register?token=${newToken}&email=${encodeURIComponent(email)}&role=${role}`
|
||||
const baseUrl = process.env.NEXT_PUBLIC_APP_URL || (isClient ? window.location.origin : 'http://localhost:3000')
|
||||
const newInvitationLink = `${baseUrl}/register?token=${newToken}&email=${encodeURIComponent(email)}&role=${role}`
|
||||
|
||||
setUsers(
|
||||
users.map((user) =>
|
||||
|
Reference in New Issue
Block a user