fix(lib): remove unnecessary default prop values and format tests

This commit is contained in:
mahula 2026-01-15 18:23:02 +01:00
parent 6f45c47765
commit 7c31198792
6 changed files with 10 additions and 11 deletions

View File

@ -20,12 +20,12 @@ export const Layer = ({
id,
data,
children,
name = 'places',
menuText = 'add new place',
menuColor = '#2E7D32',
name,
menuText,
menuColor,
markerIcon,
markerShape = 'circle',
markerDefaultColor = '#777',
markerDefaultColor,
markerDefaultColor2 = 'RGBA(35, 31, 32, 0.2)',
api,
itemType,

View File

@ -5,7 +5,7 @@ import LayerSVG from '#assets/layer.svg'
import { useIsLayerVisible, useToggleVisibleLayer } from '#components/Map/hooks/useFilter'
import { useLayers } from '#components/Map/hooks/useLayers'
export function LayerControl({ expandLayerControl = false }: { expandLayerControl: boolean }) {
export function LayerControl({ expandLayerControl }: { expandLayerControl: boolean }) {
const [open, setOpen] = useState(expandLayerControl)
const layers = useLayers()

View File

@ -6,7 +6,7 @@ import type { Item } from '#types/Item'
export const ProfileTextView = ({
item,
dataField = 'text',
dataField,
heading,
hideWhenEmpty,
}: {

View File

@ -310,7 +310,6 @@ describe('preprocessItemMentions', () => {
})
})
// ============================================================================
// removeMarkdownSyntax
// ============================================================================
@ -498,4 +497,3 @@ describe('preprocessMarkdown', () => {
})
})
})

View File

@ -129,7 +129,10 @@ describe('simpleMarkdownToHtml', () => {
describe('Item Mentions', () => {
it('renders mention as link with item color', () => {
const input = '<span data-item-mention data-label="Alice" data-id="abc-123">@Alice</span>'
const result = simpleMarkdownToHtml(input, [], { items: mockItems, getItemColor: mockGetItemColor })
const result = simpleMarkdownToHtml(input, [], {
items: mockItems,
getItemColor: mockGetItemColor,
})
expect(result).toContain('href="/item/abc-123"')
expect(result).toContain('class="item-mention"')
expect(result).toContain('style="color: #ef4444')
@ -159,4 +162,3 @@ describe('simpleMarkdownToHtml', () => {
})
})
})

View File

@ -197,4 +197,3 @@ describe('XSS Prevention - simpleMarkdownToHtml', () => {
})
})
})