mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
3066b7ba4e
* wip * fix scaling, query string, icons, refactor * refactor
33 lines
769 B
TypeScript
33 lines
769 B
TypeScript
import { observer } from "mobx-react";
|
|
import { Suspense } from "react";
|
|
import useStores from "~/hooks/useStores";
|
|
import lazyWithRetry from "~/utils/lazyWithRetry";
|
|
|
|
const PresentationMode = lazyWithRetry(
|
|
() => import("~/scenes/Document/components/PresentationMode")
|
|
);
|
|
|
|
function Presentation() {
|
|
const { ui } = useStores();
|
|
|
|
if (!ui.presentationData) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Suspense fallback={null}>
|
|
<PresentationMode
|
|
title={ui.presentationData.title}
|
|
icon={ui.presentationData.icon}
|
|
iconColor={ui.presentationData.color}
|
|
data={ui.presentationData.data}
|
|
onClose={() => {
|
|
ui.setPresentingDocument(null);
|
|
}}
|
|
/>
|
|
</Suspense>
|
|
);
|
|
}
|
|
|
|
export default observer(Presentation);
|