opengraph stuff

This commit is contained in:
2026-02-24 21:47:36 +00:00
parent 05f0d0e8f7
commit e36908cb0b
61 changed files with 5870 additions and 178 deletions
@@ -0,0 +1,37 @@
import { useMemo, useCallback } from 'react';
import type { LayoutNode, PanelComponents } from 'officerdev';
import { WorkspaceLayout } from 'officerdev';
import { useIsMobile } from 'hooks/useIsMobile';
import { useGlobal } from 'hooks/useGlobal';
import { defaultLayout } from './defaultLayout';
import { EmailList } from './EmailList';
import { EmailReader } from './EmailReader';
export const EmailScreen = () => {
const isMobile = useIsMobile();
const [selectedId, setSelectedId] = useGlobal<string | null>('EMAIL_SELECTED', null);
const components: PanelComponents = useMemo(
() => ({
'email-list': EmailList,
'email-reader': EmailReader,
}),
[],
);
const mobilePanelId = isMobile && selectedId ? 'email-reader' : undefined;
const onMobileBack = useCallback(() => setSelectedId(null), [setSelectedId]);
return (
<div className="h-full w-full pt-2">
<WorkspaceLayout
layout={defaultLayout}
onLayoutChange={() => {}}
components={components}
isMobile={isMobile}
mobilePanelId={mobilePanelId}
onMobileBack={mobilePanelId ? onMobileBack : null}
/>
</div>
);
};