Skip to content

Commit

Permalink
feat: Footer sticks to bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Sep 22, 2023
1 parent 203b3bd commit 5aded69
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
3 changes: 0 additions & 3 deletions src/components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { CozyConfirmDialogProvider } from 'cozy-harvest-lib'
import { Main, Content } from 'cozy-ui/transpiled/react/Layout'

import Applications from 'components/Applications'
import FooterLogo from 'components/FooterLogo/FooterLogo'
import ScrollToTopOnMount from 'components/ScrollToTopOnMount'
import Services from 'components/Services'
import Shortcuts from 'components/Shortcuts'
Expand All @@ -22,10 +21,8 @@ class Home extends Component {
<Applications onAppsFetched={setAppsReady} />
<Services />
<Shortcuts />
<FooterLogo />
</Content>
</Main>

<Outlet />
</CozyConfirmDialogProvider>
)
Expand Down
5 changes: 4 additions & 1 deletion src/components/MainView.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
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">
<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>
)
42 changes: 24 additions & 18 deletions src/containers/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { toFlagNames } from './toFlagNames'
import { Konnector } from 'components/Konnector'
import DefaultRedirectionSnackbar from 'components/DefaultRedirectionSnackbar/DefaultRedirectionSnackbar'
import ReloadFocus from './ReloadFocus'
import FooterLogo from 'components/FooterLogo/FooterLogo'

const IDLE = 'idle'
const FETCHING_CONTEXT = 'FETCHING_CONTEXT'

Expand Down Expand Up @@ -130,30 +132,34 @@ const App = ({ accounts, konnectors, triggers }) => {
</Main>
)}
{!isFetching && (
<Routes>
<Route
path="/connected"
element={
<Home
wrapper={contentWrapper}
setAppsReady={() => setAppsReady(true)}
/>
}
>
<Route path=":konnectorSlug/*" element={<Konnector />} />

<Route path="providers" element={<StoreRedirection />}>
<Route path=":category" element={<StoreRedirection />} />
<>
<Routes>
<Route
path="/connected"
element={
<Home
wrapper={contentWrapper}
setAppsReady={() => setAppsReady(true)}
/>
}
>
<Route path=":konnectorSlug/*" element={<Konnector />} />

<Route path="providers" element={<StoreRedirection />}>
<Route path=":category" element={<StoreRedirection />} />
</Route>
</Route>
</Route>

<Route path="/redirect" element={<IntentRedirect />} />
<Route path="/redirect" element={<IntentRedirect />} />

<Route path="*" element={<Navigate to="connected" />} />
</Routes>
<Route path="*" element={<Navigate to="connected" />} />
</Routes>
</>
)}

<IconSprite />
</div>
<FooterLogo />
</MainView>
{isFlagshipApp() && <DefaultRedirectionSnackbar />}
{flag(FLAG_FAB_BUTTON_ENABLED) && isMobile && <AddButton />}
Expand Down

0 comments on commit 5aded69

Please sign in to comment.