Skip to content

Commit

Permalink
fix: Adapt Footer placement to match Flagship application constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre authored and Crash-- committed Oct 5, 2023
1 parent 8f1da9f commit ee4e8fb
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions src/components/MainView.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import React from 'react'

export const MainView = ({ children }) => (
<main
className="main-view u-flex u-flex-column u-flex-content-start u-flex-content-stretch u-w-100 u-pos-relative"
style={{ minHeight: '100vh' }}
>
{children}
</main>
)
import { getFlagshipMetadata } from 'cozy-device-helper'

export const MainView = ({ children }) => {
const isImmersive = getFlagshipMetadata().immersive

return (
<main
className="main-view u-flex u-flex-column u-flex-content-start u-flex-content-stretch u-w-100 u-pos-relative"
style={{
minHeight: isImmersive
? 'calc(100vh - var(--flagship-bottom-height) - var(--flagship-top-height))'
: '100vh'
}}
>
{children}
</main>
)
}

0 comments on commit ee4e8fb

Please sign in to comment.