MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / InboxViewToggle

Function InboxViewToggle

ui/src/components/InboxSidebar.tsx:130–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128/** Header toggle (mounted via the section's `Actions` slot). Segmented
129 * Time / Workspace switch. */
130export function InboxViewToggle() {
131 const { t } = useTranslation()
132 const mode = useInboxViewMode((s) => s.mode)
133 const setMode = useInboxViewMode((s) => s.setMode)
134
135 return (
136 <div className="flex items-center rounded-md border border-border/70 overflow-hidden">
137 <ToggleBtn
138 active={mode === 'time'}
139 onClick={() => setMode('time')}
140 title={t('inbox.viewTime')}
141 >
142 <Clock size={13} strokeWidth={2} />
143 </ToggleBtn>
144 <ToggleBtn
145 active={mode === 'workspace'}
146 onClick={() => setMode('workspace')}
147 title={t('inbox.viewWorkspace')}
148 >
149 <Layers size={13} strokeWidth={2} />
150 </ToggleBtn>
151 </div>
152 )
153}
154
155function ToggleBtn({
156 active, onClick, title, children,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected