fix(dashboard): resolve TS build errors in a11y changes
- Fix duplicate className attr in EmojiDialogs.tsx
- Replace animated.div with animated('div') in expression-reviewer and zoomable-chart to fix React 19 children type error
- Fix malformed i18n JSON (a11y namespace was outside root object)
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
|
||||
import { animated, useSpring } from '@react-spring/web'
|
||||
|
||||
const AnimatedDiv = animated('div')
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import {
|
||||
Dialog,
|
||||
@@ -1443,7 +1445,6 @@ export function ExpressionReviewer({ open, onOpenChange }: ExpressionReviewerPro
|
||||
aria-label="待审核的表达方式"
|
||||
aria-activedescendant={quickExpressions[quickCurrentIndex] ? `quick-expr-${quickExpressions[quickCurrentIndex].id}` : undefined}
|
||||
>
|
||||
<div className="relative w-full max-w-md h-[400px] flex items-center justify-center">
|
||||
{quickExpressions
|
||||
.slice(quickCurrentIndex, quickCurrentIndex + 5)
|
||||
.reverse()
|
||||
@@ -1504,7 +1505,7 @@ if (isCurrent) {
|
||||
}
|
||||
|
||||
return isCurrent ? (
|
||||
<animated.div
|
||||
<AnimatedDiv
|
||||
key={expr.id}
|
||||
ref={cardRef}
|
||||
role="option"
|
||||
@@ -1588,7 +1589,7 @@ if (isCurrent) {
|
||||
</div>
|
||||
<span className="font-mono">{formatTime(expr.create_date)}</span>
|
||||
</div>
|
||||
</animated.div>
|
||||
</AnimatedDiv>
|
||||
) : (
|
||||
<div
|
||||
key={expr.id}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
import { useRef } from 'react'
|
||||
import { animated, useSpring } from '@react-spring/web'
|
||||
|
||||
const AnimatedDiv = animated('div')
|
||||
import { usePinch } from '@use-gesture/react'
|
||||
|
||||
import { cn } from '@/lib/utils'
|
||||
@@ -82,9 +84,9 @@ export function ZoomableChart({
|
||||
className={cn('overflow-hidden touch-none select-none', className)}
|
||||
style={{ touchAction: 'none' }}
|
||||
>
|
||||
<animated.div style={style} className="w-full h-full origin-center">
|
||||
<AnimatedDiv style={style} className="w-full h-full origin-center">
|
||||
{children}
|
||||
</animated.div>
|
||||
</AnimatedDiv>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -474,3 +474,4 @@
|
||||
"closeMenu": "Close menu",
|
||||
"navigatedTo": "Navigated to {{page}}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,3 +474,4 @@
|
||||
"closeMenu": "メニューを閉じる",
|
||||
"navigatedTo": "{{page}} に移動しました"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,3 +474,4 @@
|
||||
"closeMenu": "메뉴 닫기",
|
||||
"navigatedTo": "{{page}}으로 이동했습니다"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,3 +474,4 @@
|
||||
"closeMenu": "关闭菜单",
|
||||
"navigatedTo": "已导航至 {{page}}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -781,11 +781,6 @@ export function EmojiUploadDialog({
|
||||
${isSelected ? 'ring-2 ring-primary' : ''}
|
||||
${complete ? 'border-green-500 bg-green-50 dark:bg-green-950/20' : 'border-border hover:border-muted-foreground/50'}
|
||||
`}
|
||||
className={`
|
||||
flex items-center gap-3 p-3 rounded-lg border-2 cursor-pointer transition-all
|
||||
${isSelected ? 'ring-2 ring-primary' : ''}
|
||||
${complete ? 'border-green-500 bg-green-50 dark:bg-green-950/20' : 'border-border hover:border-muted-foreground/50'}
|
||||
`}
|
||||
>
|
||||
<div className="w-12 h-12 rounded border overflow-hidden bg-muted flex-shrink-0 flex items-center justify-center">
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user