Skip to content

Commit

Permalink
Remove code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Nov 6, 2024
1 parent 6091d00 commit 4e1a481
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
8 changes: 0 additions & 8 deletions content/static/en/thanks-gitlab.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion content/static/en/thanks.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Thank you for your contribution to Open Terms Archive!

Your suggestion has been turned to a <a href={url} target="_blank">pull request</a> on GitHub. You can follow the status of your suggestion there and communicate with us about it by creating an account on GitHub.
Your suggestion has been turned to a <a href={url} target="_blank">pull request</a> on {platform}. You can follow the status of your suggestion there and communicate with us about it by creating an account on {platform}.

In order to guarantee a high quality of data, we test each contribution individually to make sure it works as intended and is stable over time. We do our best to start tracking the document you suggested as fast as possible, but these checks may take a few days.

Expand Down
7 changes: 0 additions & 7 deletions content/static/fr/thanks-gitlab.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion content/static/fr/thanks.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Vous êtes maintenant un contributeur du projet Open Terms Archive

Pour gérer facilement les contributions, nous utilisons les issues GitHub. Nous en avons donc créé une que <a href={url} rel="noopener">vous pouvez voir ici</a>. Cela vous permet de connaître le statut de votre contribution et de communiquer avec nous à son sujet.
Pour gérer facilement les contributions, nous utilisons les issues {platform}. Nous en avons donc créé une que <a href={url} rel="noopener">vous pouvez voir ici</a>. Cela vous permet de connaître le statut de votre contribution et de communiquer avec nous à son sujet.

Nous faisons de notre mieux pour ajouter votre demande le plus rapidement possible mais cela peut prendre plusieurs jours. En effet, pour garantir une haute qualité des données nous testons chaque contribution pour nous assurer que tout fonctionne parfaitement.

Expand Down
6 changes: 3 additions & 3 deletions src/pages/thanks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function ThanksPage({ mdxContent }: WithMdxResult) {
</Container>

<Container gridCols="9" gridGutters="8" paddingY={false}>
<TextContent>{mdxContent && <MDXRemote {...mdxContent} scope={{ url }} />}</TextContent>
<TextContent>{mdxContent && <MDXRemote {...mdxContent} scope={{ url, platform: process.env.NEXT_PUBLIC_REPO_TYPE === "GITLAB" ? "GitLab" : "GitHub" }} />}</TextContent>
</Container>

<Container gridCols="9" gridGutters="8">
Expand All @@ -54,7 +54,7 @@ export default function ThanksPage({ mdxContent }: WithMdxResult) {

export const getStaticProps = withMdx({
load: 'mdx',
filename: process.env.NEXT_PUBLIC_REPO_TYPE === "GITLAB" ? 'thanks-gitlab' : 'thanks',
folder: 'static'
filename: 'thanks',
folder: 'static'
})();

0 comments on commit 4e1a481

Please sign in to comment.