Skip to content

Commit

Permalink
We ignore the Git infered version for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Parisot committed Dec 1, 2021
1 parent b1d0455 commit e526a1f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 43 deletions.
17 changes: 0 additions & 17 deletions front/gatsby/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion front/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"prettier": "^2.3.0",
"sass": "^1.43.4",
"vite": "^2.6.14",
"vite-plugin-git-revision": "^0.1.9",
"vite-plugin-handlebars": "^1.6.0"
}
}
40 changes: 19 additions & 21 deletions front/gatsby/src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,25 @@ function Footer () {
const userHasConsent = useSelector(state => state.userPreferences.trackingConsent)
const toggleConsent = useCallback(() => dispatch({ type: 'USER_PREFERENCES_TOGGLE', key: 'trackingConsent' }), [])

return (<Switch>
<Route path="*/preview" />
<Route path="*">
<footer className={styles.footerContainer}>
<ul className={styles.footerList}>
<li>
<a href="https://github.com/EcrituresNumeriques/stylo/releases" rel="noopener noreferrer" target="_blank">
Stylo v1.5
</a>
</li>
<li><Link to="/privacy">Privacy</Link></li>
{ import.meta.env.SNOWPACK_MATOMO_URL && (<li>
<label className={styles.consentLabel}>
<input type="checkbox" checked={userHasConsent} onChange={toggleConsent} disabled={true} />
I accept to share my navigation stats
</label>
</li>) }
</ul>
</footer>
</Route>
</Switch>)
return (
<footer className={styles.footerContainer}>
<ul className={styles.footerList}>
<li>Stylo</li>
<li>
<a href="https://github.com/EcrituresNumeriques/stylo/releases" rel="noopener noreferrer" target="_blank">
Changelog
</a>
</li>
<li><Link to="/privacy">Privacy</Link></li>
{ import.meta.env.SNOWPACK_MATOMO_URL && (<li>
<label className={styles.consentLabel}>
<input type="checkbox" checked={userHasConsent} onChange={toggleConsent} disabled={true} />
I accept to share my navigation stats
</label>
</li>) }
</ul>
</footer>
)
}

export default Footer
4 changes: 0 additions & 4 deletions front/gatsby/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { defineConfig } from 'vite'
import { env } from 'process'
import react from '@vitejs/plugin-react'
import handlebars from 'vite-plugin-handlebars'
import GitRevision from 'vite-plugin-git-revision'

const { NODE_ENV, SNOWPACK_MATOMO_URL, SNOWPACK_MATOMO_SITE_ID } = env

Expand All @@ -23,9 +22,6 @@ export default defineConfig({
},
plugins: [
react(),
GitRevision.default({
versionCommand:'describe --tags --abbrev=0 --always'
}),
handlebars({
context: {
NODE_ENV,
Expand Down

0 comments on commit e526a1f

Please sign in to comment.