-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35db783
commit 79e366f
Showing
5 changed files
with
23 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.container { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
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,5 @@ | ||
import styles from './map-fallback.module.css'; | ||
|
||
export default function MyMapFallback() { | ||
return <div className={styles.container}>Map loading...</div>; | ||
} |
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,11 +1,10 @@ | ||
import type {MetaFunction} from '@remix-run/node'; | ||
import MyMap from '../components/map/map.client'; | ||
import {ClientOnly} from 'remix-utils/client-only'; | ||
|
||
export const meta: MetaFunction = () => { | ||
return [{title: 'Remix Example'}]; | ||
}; | ||
import MyMap from '../components/map/map.client'; | ||
import MyMapFallback from '../components/map/map-fallback'; | ||
|
||
export default function Index() { | ||
return <ClientOnly>{() => <MyMap />}</ClientOnly>; | ||
return ( | ||
<ClientOnly fallback={<MyMapFallback />}>{() => <MyMap />}</ClientOnly> | ||
); | ||
} |