|
|
@@ -1,6 +1,8 @@
|
|
|
import React, { FC, memo } from 'react';
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
|
+import { useSWRxV5MigrationStatus } from '~/stores/page-listing';
|
|
|
+
|
|
|
import ItemsTree from './PageTree/ItemsTree';
|
|
|
import PrivateLegacyPages from './PageTree/PrivateLegacyPages';
|
|
|
|
|
|
@@ -8,6 +10,8 @@ import PrivateLegacyPages from './PageTree/PrivateLegacyPages';
|
|
|
const PageTree: FC = memo(() => {
|
|
|
const { t } = useTranslation();
|
|
|
|
|
|
+ const { data } = useSWRxV5MigrationStatus();
|
|
|
+
|
|
|
return (
|
|
|
<>
|
|
|
<div className="grw-sidebar-content-header p-3">
|
|
|
@@ -16,7 +20,14 @@ const PageTree: FC = memo(() => {
|
|
|
|
|
|
<div className="grw-sidebar-content-body">
|
|
|
<ItemsTree />
|
|
|
- <PrivateLegacyPages />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div className="grw-sidebar-content-footer">
|
|
|
+ {
|
|
|
+ data?.migratablePagesCount != null && data.migratablePagesCount !== 0 && (
|
|
|
+ <PrivateLegacyPages />
|
|
|
+ )
|
|
|
+ }
|
|
|
</div>
|
|
|
</>
|
|
|
);
|