|
@@ -1,5 +1,6 @@
|
|
|
import React, { useCallback, useState, useEffect } from 'react';
|
|
import React, { useCallback, useState, useEffect } from 'react';
|
|
|
|
|
|
|
|
|
|
+import dynamic from 'next/dynamic';
|
|
|
import { Collapse, Button } from 'reactstrap';
|
|
import { Collapse, Button } from 'reactstrap';
|
|
|
|
|
|
|
|
|
|
|
|
@@ -9,29 +10,27 @@ import {
|
|
|
EditorMode, useDrawerOpened, useEditorMode, useIsDeviceSmallerThanMd,
|
|
EditorMode, useDrawerOpened, useEditorMode, useIsDeviceSmallerThanMd,
|
|
|
} from '~/stores/ui';
|
|
} from '~/stores/ui';
|
|
|
|
|
|
|
|
-import SavePageControls from '../SavePageControls';
|
|
|
|
|
-import SlackLogo from '../SlackLogo';
|
|
|
|
|
-import { SlackNotification } from '../SlackNotification';
|
|
|
|
|
|
|
|
|
|
|
|
+const SavePageControls = dynamic(() => import('~/components/SavePageControls').then(mod => mod.SavePageControls), { ssr: false });
|
|
|
|
|
+const SlackLogo = dynamic(() => import('~/components/SlackLogo').then(mod => mod.SlackLogo), { ssr: false });
|
|
|
|
|
+const SlackNotification = dynamic(() => import('~/components/SlackNotification').then(mod => mod.SlackNotification), { ssr: false });
|
|
|
|
|
+const OptionsSelector = dynamic(() => import('~/components/PageEditor/OptionsSelector').then(mod => mod.OptionsSelector), { ssr: false });
|
|
|
|
|
|
|
|
-import OptionsSelector from './OptionsSelector';
|
|
|
|
|
|
|
|
|
|
-const EditorNavbarBottom = (props) => {
|
|
|
|
|
-
|
|
|
|
|
- const { data: editorMode } = useEditorMode();
|
|
|
|
|
|
|
+const EditorNavbarBottom = (): JSX.Element => {
|
|
|
|
|
|
|
|
const [isExpanded, setExpanded] = useState(false);
|
|
const [isExpanded, setExpanded] = useState(false);
|
|
|
-
|
|
|
|
|
const [isSlackExpanded, setSlackExpanded] = useState(false);
|
|
const [isSlackExpanded, setSlackExpanded] = useState(false);
|
|
|
|
|
|
|
|
|
|
+ const { data: editorMode } = useEditorMode();
|
|
|
const { data: isSlackConfigured } = useIsSlackConfigured();
|
|
const { data: isSlackConfigured } = useIsSlackConfigured();
|
|
|
const { mutate: mutateDrawerOpened } = useDrawerOpened();
|
|
const { mutate: mutateDrawerOpened } = useDrawerOpened();
|
|
|
const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
|
|
const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
|
|
|
- const additionalClasses = ['grw-editor-navbar-bottom'];
|
|
|
|
|
const { data: currentPagePath } = useCurrentPagePath();
|
|
const { data: currentPagePath } = useCurrentPagePath();
|
|
|
const { data: slackChannelsData } = useSWRxSlackChannels(currentPagePath);
|
|
const { data: slackChannelsData } = useSWRxSlackChannels(currentPagePath);
|
|
|
|
|
|
|
|
const { data: isSlackEnabled, mutate: mutateIsSlackEnabled } = useIsSlackEnabled();
|
|
const { data: isSlackEnabled, mutate: mutateIsSlackEnabled } = useIsSlackEnabled();
|
|
|
|
|
+ const additionalClasses = ['grw-editor-navbar-bottom'];
|
|
|
|
|
|
|
|
const [slackChannelsStr, setSlackChannelsStr] = useState<string>('');
|
|
const [slackChannelsStr, setSlackChannelsStr] = useState<string>('');
|
|
|
|
|
|