mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-04 10:19:31 -06:00
refactor: simplify chart type icon assignment in ChartRow component
This commit is contained in:
@@ -18,7 +18,7 @@ interface ChartRowProps {
|
||||
export function ChartRow({ chart, environmentId, isReadOnly }: Readonly<ChartRowProps>) {
|
||||
const { t } = useTranslation();
|
||||
const [isEditDialogOpen, setIsEditDialogOpen] = useState(false);
|
||||
const IconComponent = CHART_TYPE_ICONS[chart.type as keyof typeof CHART_TYPE_ICONS] ?? BarChart3Icon;
|
||||
const IconComponent = CHART_TYPE_ICONS[chart.type] ?? BarChart3Icon;
|
||||
|
||||
const handleChartClick = () => {
|
||||
if (!isReadOnly) {
|
||||
|
||||
Reference in New Issue
Block a user