refac
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
import Modal from '$lib/components/common/Modal.svelte';
|
||||
import XMark from '$lib/components/icons/XMark.svelte';
|
||||
import CitationModal from './CitationModal.svelte';
|
||||
|
||||
export let id = '';
|
||||
export let show = false;
|
||||
@@ -12,6 +13,14 @@
|
||||
export let showPercentage = false;
|
||||
export let showRelevance = true;
|
||||
|
||||
let showCitationModal = false;
|
||||
let selectedCitation: any = null;
|
||||
|
||||
export const showCitation = (citation) => {
|
||||
selectedCitation = citation;
|
||||
showCitationModal = true;
|
||||
};
|
||||
|
||||
const decodeString = (str: string) => {
|
||||
try {
|
||||
return decodeURIComponent(str);
|
||||
@@ -21,6 +30,13 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<CitationModal
|
||||
bind:show={showCitationModal}
|
||||
citation={selectedCitation}
|
||||
{showPercentage}
|
||||
{showRelevance}
|
||||
/>
|
||||
|
||||
<Modal size="lg" bind:show>
|
||||
<div>
|
||||
<div class=" flex justify-between dark:text-gray-300 px-5 pt-4 pb-2">
|
||||
|
||||
Reference in New Issue
Block a user