mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 10:05:36 +01:00
Remove board component title fallback
This commit is contained in:
parent
432be5a5d5
commit
676d83e8f6
2 changed files with 2 additions and 5 deletions
|
|
@ -14,7 +14,6 @@ import { Panel } from '@/components/common/Panel';
|
||||||
import { useBoard, useMessages } from '@/components/hooks';
|
import { useBoard, useMessages } from '@/components/hooks';
|
||||||
import { Pencil, Plus, X } from '@/components/icons';
|
import { Pencil, Plus, X } from '@/components/icons';
|
||||||
import type { BoardComponentConfig } from '@/lib/types';
|
import type { BoardComponentConfig } from '@/lib/types';
|
||||||
import { getComponentDefinition } from '../boardComponentRegistry';
|
|
||||||
import { BoardComponentRenderer } from './BoardComponentRenderer';
|
import { BoardComponentRenderer } from './BoardComponentRenderer';
|
||||||
import { BoardComponentSelect } from './BoardComponentSelect';
|
import { BoardComponentSelect } from './BoardComponentSelect';
|
||||||
|
|
||||||
|
|
@ -53,8 +52,7 @@ export function BoardEditColumn({
|
||||||
|
|
||||||
const hasComponent = !!component;
|
const hasComponent = !!component;
|
||||||
const canRemoveAction = hasComponent || canRemove;
|
const canRemoveAction = hasComponent || canRemove;
|
||||||
const defaultTitle = component ? getComponentDefinition(component.type)?.name : undefined;
|
const title = component?.title;
|
||||||
const title = component?.title ?? defaultTitle;
|
|
||||||
const description = component?.description;
|
const description = component?.description;
|
||||||
|
|
||||||
const handleRemove = () => {
|
const handleRemove = () => {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import { Box, Column } from '@umami/react-zen';
|
||||||
import { Panel } from '@/components/common/Panel';
|
import { Panel } from '@/components/common/Panel';
|
||||||
import { useBoard } from '@/components/hooks';
|
import { useBoard } from '@/components/hooks';
|
||||||
import type { BoardComponentConfig } from '@/lib/types';
|
import type { BoardComponentConfig } from '@/lib/types';
|
||||||
import { getComponentDefinition } from '../boardComponentRegistry';
|
|
||||||
import { BoardComponentRenderer } from './BoardComponentRenderer';
|
import { BoardComponentRenderer } from './BoardComponentRenderer';
|
||||||
|
|
||||||
export function BoardViewColumn({ component }: { component?: BoardComponentConfig }) {
|
export function BoardViewColumn({ component }: { component?: BoardComponentConfig }) {
|
||||||
|
|
@ -13,7 +12,7 @@ export function BoardViewColumn({ component }: { component?: BoardComponentConfi
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = component.title ?? getComponentDefinition(component.type)?.name;
|
const title = component.title;
|
||||||
const description = component.description;
|
const description = component.description;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue