diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index dc70cf8..593f3f6 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,6 +1,5 @@ import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import VersionUpgradeModal from './modals/VersionUpgradeModal'; import { useDeviceSettings } from '../hooks/useDeviceSettings'; import { useVersionCheck } from '../hooks/useVersionCheck'; import { useUiPreferences } from '../hooks/useUiPreferences'; @@ -196,6 +195,11 @@ function Sidebar({ sessionDeleteConfirmation={sessionDeleteConfirmation} onCancelDeleteSession={() => setSessionDeleteConfirmation(null)} onConfirmDeleteSession={confirmDeleteSession} + showVersionModal={showVersionModal} + onCloseVersionModal={() => setShowVersionModal(false)} + releaseInfo={releaseInfo} + currentVersion={currentVersion} + latestVersion={latestVersion} t={t} /> @@ -234,13 +238,6 @@ function Sidebar({ )} - setShowVersionModal(false)} - releaseInfo={releaseInfo} - currentVersion={currentVersion} - latestVersion={latestVersion} - /> ); } diff --git a/src/components/sidebar/SidebarModals.tsx b/src/components/sidebar/SidebarModals.tsx index b05951d..6d94650 100644 --- a/src/components/sidebar/SidebarModals.tsx +++ b/src/components/sidebar/SidebarModals.tsx @@ -4,7 +4,9 @@ import type { TFunction } from 'i18next'; import { Button } from '../ui/button'; import ProjectCreationWizard from '../ProjectCreationWizard'; import Settings from '../Settings'; +import VersionUpgradeModal from '../modals/VersionUpgradeModal'; import type { Project } from '../../types/app'; +import type { ReleaseInfo } from '../../types/sharedTypes'; import type { DeleteProjectConfirmation, SessionDeleteConfirmation } from './types'; type SidebarModalsProps = { @@ -21,6 +23,11 @@ type SidebarModalsProps = { sessionDeleteConfirmation: SessionDeleteConfirmation | null; onCancelDeleteSession: () => void; onConfirmDeleteSession: () => void; + showVersionModal: boolean; + onCloseVersionModal: () => void; + releaseInfo: ReleaseInfo | null; + currentVersion: string; + latestVersion: string | null; t: TFunction; }; @@ -38,6 +45,11 @@ export default function SidebarModals({ sessionDeleteConfirmation, onCancelDeleteSession, onConfirmDeleteSession, + showVersionModal, + onCloseVersionModal, + releaseInfo, + currentVersion, + latestVersion, t, }: SidebarModalsProps) { return ( @@ -155,6 +167,14 @@ export default function SidebarModals({ , document.body, )} + + ); }