-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: supprime le style global sur body
- Loading branch information
1 parent
c88b84a
commit 11cd3a6
Showing
7 changed files
with
98 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
import { Loading } from '@geist-ui/core' | ||
import clsx from 'clsx' | ||
import React, { Suspense } from 'react' | ||
import { useSelector } from 'react-redux' | ||
import { Route, Switch } from 'react-router-dom' | ||
|
||
import styles from './app.module.scss' | ||
|
||
|
||
export default function StyloApp ({ children }) { | ||
const hasBooted = useSelector(state => state.hasBooted) | ||
|
||
return ( | ||
<main> | ||
<Suspense fallback={<Loading />}> | ||
{hasBooted ? (children) : <Loading />} | ||
</Suspense> | ||
</main> | ||
<Suspense fallback={<Loading/>}> | ||
{hasBooted ? | ||
<Switch> | ||
<Route path="/article/*"> | ||
<main className={clsx(styles.app, styles.viewportMaxHeight)}> | ||
{children} | ||
</main> | ||
</Route> | ||
<Route path="*"> | ||
<main className={styles.app}> | ||
{children} | ||
</main> | ||
</Route> | ||
</Switch> : <Loading/>} | ||
</Suspense> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.app { | ||
overflow-y: scroll; | ||
height: 100%; | ||
} | ||
|
||
.viewportMaxHeight { | ||
overflow-y: auto; | ||
} | ||
|
||
.content { | ||
min-height: 100vh; | ||
} |