refac: citation rendering

This commit is contained in:
Timothy J. Baek committed 2024-05-06 16:16:26 -07:00
1 parent 64ed0d1089
commit aef2a514d1
2 files changed
+44 -30

No files matched your search

@@ -5,12 +5,11 @@
const i18n = getContext('i18n');
export let show = false;
export let citation: any[];
export let citation;
let mergedDocuments = [];
onMount(async () => {
// Merge the document with its metadata
$: if (citation) {
mergedDocuments = citation.document?.map((c, i) => {
return {
source: citation.source,
@@ -18,7 +17,7 @@
metadata: citation.metadata?.[i]
};
});
});
}
</script>
<Modal size="lg" bind:show>