-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
534 additions
and
685 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
"use client" | ||
import React, { Suspense } from "react" | ||
import { MDXRemote } from "next-mdx-remote-client/rsc" | ||
import type { MDXRemoteOptions } from "next-mdx-remote-client/rsc" | ||
import { ANDROID_URL, IOS_URL } from "~/constants" | ||
import appStorePic from "~/public/images/other/app-store-fr.png" | ||
import googlePlayPic from "~/public/images/other/google-play-fr.png" | ||
|
||
const components = { | ||
DownloadButtons: () => ( | ||
<div className="mt-[70px] mb-1 grid max-w-[200px] sm:max-w-[400px] sm:grid-flow-col gap-6 auto-cols-fr md:w-5/6 m-auto"> | ||
<a href={ANDROID_URL} target="_blank" rel="noopener noreferrer"> | ||
<img | ||
className="object-contain w-full" | ||
src={googlePlayPic.src} | ||
alt="télécharger dans Google Play" | ||
/> | ||
</a> | ||
<a href={IOS_URL} target="_blank" rel="noopener noreferrer"> | ||
<img | ||
className="object-contain w-full" | ||
src={appStorePic.src} | ||
alt="télécharger dans l'App Store" | ||
/> | ||
</a> | ||
</div> | ||
), | ||
} | ||
const options: MDXRemoteOptions = { | ||
mdxOptions: { | ||
// ... | ||
}, | ||
parseFrontmatter: true, | ||
// scope: { | ||
// readingTime: calculateSomeHow(source), | ||
// }, | ||
} | ||
|
||
export default function CustomMDX({ source }) { | ||
return ( | ||
<Suspense fallback={<div>Loading...</div>}> | ||
<MDXRemote options={options} components={components} source={source} /> | ||
</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
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
Oops, something went wrong.