{revisionId != null && (
)}
{revisionId != null && (
)}
{revisionId != null && (
)}
{revisionId != null && (
) }
{ showPageControlDropdown && (
)}
);
};
type PageControlsProps = CommonProps & {
pageId: string,
shareLinkId?: string | null,
revisionId?: string | null,
path?: string | null,
expandContentWidth?: boolean,
};
export const PageControls = memo((props: PageControlsProps): JSX.Element => {
const {
pageId, revisionId, path, shareLinkId, expandContentWidth,
onClickDuplicateMenuItem, onClickRenameMenuItem, onClickDeleteMenuItem, onClickSwitchContentWidth,
} = props;
const { data: pageInfo, error } = useSWRxPageInfo(pageId ?? null, shareLinkId);
if (error != null) {
return <>>;
}
if (!isIPageInfoForOperation(pageInfo)) {
return <>>;
}
return (