Skip to content

Commit

Permalink
fix(mapper): correctly inject username into qrcode from logged in det…
Browse files Browse the repository at this point in the history
…ails
  • Loading branch information
spwoodcock committed Dec 9, 2024
1 parent 48a9a69 commit e26d9fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mapper/src/lib/components/qrcode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import type { Snippet } from 'svelte';
import SlDialog from '@shoelace-style/shoelace/dist/components/dialog/dialog.component.js';
import { getLoginStore } from '$store/login.svelte.ts';
import { generateQrCode, downloadQrCode } from '$lib/odk/qrcode';
interface Props {
Expand All @@ -13,7 +14,9 @@
let { infoDialogRef, projectName, projectOdkToken, children }: Props = $props();
let qrCodeData = $derived(generateQrCode(projectName, projectOdkToken, 'REPLACE_ME_WITH_A_USERNAME'));
const loginStore = getLoginStore();
let qrCodeData = $derived(generateQrCode(projectName, projectOdkToken, loginStore.getAuthDetails?.username || 'fmtm user'));
</script>

<div class="flex flex-col items-center p-4 space-y-4">
Expand Down

0 comments on commit e26d9fe

Please sign in to comment.