mirror of
https://github.com/covidpass-org/covidpass.git
synced 2025-02-24 07:27:53 +01:00
Merge pull request #26 from billylo1/show-formatted-number
Show nicely formatted text
This commit is contained in:
commit
a6a6da125e
@ -7,7 +7,7 @@ import Link from 'next/link'
|
|||||||
function Logo(): JSX.Element {
|
function Logo(): JSX.Element {
|
||||||
const { t } = useTranslation('common');
|
const { t } = useTranslation('common');
|
||||||
const passCount = usePassCount();
|
const passCount = usePassCount();
|
||||||
const displayPassCount = (passCount? ` - ${passCount.toLocaleString()} receipts processed to date!` : '');
|
const displayPassCount = (passCount? ` - ${passCount} receipts processed to date!` : '');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
|
@ -15,7 +15,7 @@ function Page(props: PageProps): JSX.Element {
|
|||||||
const { t } = useTranslation('common');
|
const { t } = useTranslation('common');
|
||||||
|
|
||||||
const passCount = usePassCount();
|
const passCount = usePassCount();
|
||||||
const displayPassCount = (passCount? ` - ${passCount.toLocaleString()} receipts processed to date!` : '');
|
const displayPassCount = (passCount? ` - ${passCount} receipts processed to date!` : '');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="md:w-2/3 xl:w-2/5 md:mx-auto flex flex-col min-h-screen justify-center px-5 py-12">
|
<div className="md:w-2/3 xl:w-2/5 md:mx-auto flex flex-col min-h-screen justify-center px-5 py-12">
|
||||||
|
@ -23,7 +23,7 @@ export default function usePassCount() {
|
|||||||
let response = await fetch(request);
|
let response = await fetch(request);
|
||||||
const counter = await response.text();
|
const counter = await response.text();
|
||||||
|
|
||||||
return Promise.resolve(counter);
|
return Promise.resolve(parseInt(counter, 10).toLocaleString());
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user