MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / viewMenuItems

Function viewMenuItems

packages/app-core/src/components/DatabaseView.tsx:66–74  ·  view source on GitHub ↗
(viewId: string)

Source from the content-addressed store, hash-verified

64 const activeView = doc.views.find((v) => v.id === doc.activeViewId) ?? doc.views[0]
65
66 const viewMenuItems = (viewId: string): ContextMenuItem[] => [
67 { label: 'Rename view', onSelect: () => setRenamingView(viewId) },
68 {
69 label: 'Delete view',
70 danger: true,
71 disabled: doc.views.length <= 1,
72 onSelect: () => updateDatabaseSchema(csvPath, removeView(doc, viewId))
73 }
74 ]
75
76 return (
77 <div className="flex min-h-0 flex-1 flex-col bg-paper-100 text-ink-900">

Callers 1

DatabaseViewFunction · 0.85

Calls 1

removeViewFunction · 0.90

Tested by

no test coverage detected