diff --git a/.releaserc.json b/.releaserc.json index 70146fd..0749a4a 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -13,6 +13,7 @@ "preset": "conventionalcommits" } ], + "@semantic-release/npm", "@semantic-release/github" ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d0bd1ae..b0882b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,8 +51,8 @@ Scopes define what part of the code changed. ### Prerequisites -- [Node.js](https://nodejs.org/) >= 14 -- [npm](https://www.npmjs.com/) >= 7 +- [Node.js](https://nodejs.org/) >= 14.0.0 +- [npm](https://www.npmjs.com/) >= 7.0.0 ### Installation diff --git a/components/Footer.tsx b/components/Footer.tsx index 5ae92c3..1058755 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,13 +1,42 @@ +import { useMemo } from 'react' +import Link from 'next/link' import useTranslation from 'next-translate/useTranslation' -export const Footer: React.FC = () => { +export interface FooterProps { + version: string +} + +export const Footer: React.FC = (props) => { const { t } = useTranslation() + const { version } = props + + const versionLink = useMemo(() => { + if (version !== '0.0.0-development') { + return `https://github.com/Divlo/Divlo/releases/tag/v${version}` + } + return 'https://github.com/Divlo/Divlo/tree/develop' + }, [version]) return ( -