Skip to content

Commit 9534a5d

Browse files
authored
Merge pull request #147 from covidpass-org/dev
QR code viewer and content improvements
2 parents e765408 + b8eae1f commit 9534a5d

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

pages/pass.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,23 @@ function Pass(): JSX.Element {
1111

1212
function closeViewer() {
1313
setFragment(undefined);
14-
window.location.href = '/';
14+
window.location.replace('/');
1515
}
1616

1717
useEffect(() => {
1818
const rawFragment = window.location.hash.substring(1);
1919
const decodedFragment = Buffer.from(rawFragment, 'base64').toString();
2020
setFragment(decodedFragment);
2121

22-
window.location.replace('#');
23-
if (typeof window.history.replaceState == 'function') {
24-
const href = window.location.href;
25-
history.replaceState({}, '', href.slice(0, href.lastIndexOf('/')));
26-
}
27-
2822
document.addEventListener('visibilitychange', () => {
2923
if (document.hidden) {
3024
closeViewer();
3125
}
3226
});
3327

3428
window.addEventListener('blur', closeViewer);
29+
window.addEventListener('beforeunload', closeViewer);
30+
window.addEventListener('pagehide', closeViewer);
3531
}, []);
3632

3733
return (

pages/privacy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function Privacy(): JSX.Element {
152152
<li>
153153
{t('privacy:appleSync')}:
154154
&nbsp;
155-
<a href="https://www.apple.com/legal/privacy/en-ww/privacy.tsx" className="underline">
155+
<a href="https://www.apple.com/legal/privacy/en-ww/" className="underline">
156156
{t('common:privacyPolicy')}
157157
</a>
158158
</li>

src/payload.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {Constants} from "./constants";
33
import {COLORS} from "./colors";
44

55
enum CertificateType {
6-
Vaccination = 'Vaccination Card',
7-
Test = 'Test Certificate',
8-
Recovery = 'Recovery Certificate',
6+
Vaccination = 'Vaccination Pass',
7+
Test = 'Test Pass',
8+
Recovery = 'Recovery Pass',
99
}
1010

1111
enum TextAlignment {

0 commit comments

Comments
 (0)