Skip to content

Commit

Permalink
fix(mobile): use mobile app-fallback in app-container (#8804)
Browse files Browse the repository at this point in the history
close AF-1634
  • Loading branch information
CatsJuice committed Nov 14, 2024
1 parent 343152e commit b803fe1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/apps/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 1b0d3fe81862c0e9ce712ddd0c5a0accd0097698

COCOAPODS: 1.16.1
COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useAppSettingHelper } from '@affine/core/components/hooks/affine/use-app-setting-helper';
import { RootAppSidebar } from '@affine/core/components/root-app-sidebar';
import { AppFallback } from '@affine/core/mobile/components';
import { AppSidebarService } from '@affine/core/modules/app-sidebar';
import {
AppSidebarFallback,
Expand Down Expand Up @@ -102,7 +103,23 @@ const BrowserLayout = ({
);
};

const LayoutComponent = BUILD_CONFIG.isElectron ? DesktopLayout : BrowserLayout;
const MobileLayout = ({
children,
fallback = false,
}: PropsWithChildren<{ fallback?: boolean }>) => {
return (
<div className={styles.browserAppViewContainer}>
{fallback ? <AppFallback /> : null}
<MainContainer>{children}</MainContainer>
</div>
);
};

const LayoutComponent = BUILD_CONFIG.isElectron
? DesktopLayout
: BUILD_CONFIG.isMobileEdition
? MobileLayout
: BrowserLayout;

const MainContainer = forwardRef<
HTMLDivElement,
Expand Down

0 comments on commit b803fe1

Please sign in to comment.