refac: citation rendering

This commit is contained in:
Timothy J. Baek
2024-05-06 16:16:26 -07:00
parent 64ed0d1089
commit aef2a514d1
2 changed files with 44 additions and 30 deletions
@@ -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>