Added CURRENT_VERSION constant.

This commit is contained in:
Mike Cao 2022-08-08 11:31:36 -07:00
parent fb14514a65
commit 9b7e472410
4 changed files with 15 additions and 16 deletions

View file

@ -4,11 +4,9 @@ import classNames from 'classnames';
import { FormattedMessage } from 'react-intl';
import Link from 'components/common/Link';
import styles from './Footer.module.css';
import useStore from 'store/version';
import { HOMEPAGE_URL, REPO_URL } from 'lib/constants';
import { CURRENT_VERSION, HOMEPAGE_URL, REPO_URL } from 'lib/constants';
export default function Footer() {
const { current } = useStore();
const { pathname } = useRouter();
return (
@ -28,9 +26,9 @@ export default function Footer() {
/>
</div>
<div className={classNames(styles.version, 'col-12 col-md-4')}>
<Link href={REPO_URL}>{`v${current}`}</Link>
<Link href={REPO_URL}>{`v${CURRENT_VERSION}`}</Link>
</div>
{!pathname.includes('/share/') && <Script src={`/telemetry.js?v=${current}`} />}
{!pathname.includes('/share/') && <Script src={`/telemetry.js`} />}
</footer>
);
}