|
@@ -11,7 +11,7 @@ import { animateScroll } from 'react-scroll';
|
|
|
import { DropdownItem } from 'reactstrap';
|
|
import { DropdownItem } from 'reactstrap';
|
|
|
import { debounce } from 'throttle-debounce';
|
|
import { debounce } from 'throttle-debounce';
|
|
|
|
|
|
|
|
-import { exportAsMarkdown, updateContentWidth } from '~/client/services/page-operation';
|
|
|
|
|
|
|
+import { exportAsMarkdown } from '~/client/services/page-operation';
|
|
|
import { toastSuccess } from '~/client/util/toastr';
|
|
import { toastSuccess } from '~/client/util/toastr';
|
|
|
import { PagePathNav } from '~/components/Common/PagePathNav';
|
|
import { PagePathNav } from '~/components/Common/PagePathNav';
|
|
|
import type { IPageWithSearchMeta } from '~/interfaces/search';
|
|
import type { IPageWithSearchMeta } from '~/interfaces/search';
|
|
@@ -173,12 +173,6 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
|
|
|
openDeleteModal([pageToDelete], { onDeleted: onDeletedHandler });
|
|
openDeleteModal([pageToDelete], { onDeleted: onDeletedHandler });
|
|
|
}, [onDeletedHandler, openDeleteModal]);
|
|
}, [onDeletedHandler, openDeleteModal]);
|
|
|
|
|
|
|
|
- const switchContentWidthHandler = useCallback(async(pageId: string, value: boolean) => {
|
|
|
|
|
- await updateContentWidth(pageId, value);
|
|
|
|
|
-
|
|
|
|
|
- // TODO: revalidate page data and update shouldExpandContent
|
|
|
|
|
- }, []);
|
|
|
|
|
-
|
|
|
|
|
const RightComponent = useCallback(() => {
|
|
const RightComponent = useCallback(() => {
|
|
|
if (page == null) {
|
|
if (page == null) {
|
|
|
return <></>;
|
|
return <></>;
|
|
@@ -202,12 +196,11 @@ export const SearchResultContent: FC<Props> = (props: Props) => {
|
|
|
onClickDuplicateMenuItem={duplicateItemClickedHandler}
|
|
onClickDuplicateMenuItem={duplicateItemClickedHandler}
|
|
|
onClickRenameMenuItem={renameItemClickedHandler}
|
|
onClickRenameMenuItem={renameItemClickedHandler}
|
|
|
onClickDeleteMenuItem={deleteItemClickedHandler}
|
|
onClickDeleteMenuItem={deleteItemClickedHandler}
|
|
|
- onClickSwitchContentWidth={switchContentWidthHandler}
|
|
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
}, [page, shouldExpandContent, showPageControlDropdown, forceHideMenuItems,
|
|
}, [page, shouldExpandContent, showPageControlDropdown, forceHideMenuItems,
|
|
|
- duplicateItemClickedHandler, renameItemClickedHandler, deleteItemClickedHandler, switchContentWidthHandler]);
|
|
|
|
|
|
|
+ duplicateItemClickedHandler, renameItemClickedHandler, deleteItemClickedHandler]);
|
|
|
|
|
|
|
|
const fluidLayoutClass = shouldExpandContent ? _fluidLayoutClass : '';
|
|
const fluidLayoutClass = shouldExpandContent ? _fluidLayoutClass : '';
|
|
|
|
|
|