Skip to content

Commit

Permalink
Fix citation button on Explore page (#170)
Browse files Browse the repository at this point in the history
* Added key to markdown

* lint

* Updated key to remount the title

* lint

* Fixed url to be reactive
  • Loading branch information
Not-Abram authored Oct 4, 2024
1 parent dbd359b commit 6958439
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/viewer/src/components/Shared/Cite.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<script lang="ts">
import { onMount } from 'svelte'
import { page } from '$app/stores'
import CopyButton from './CopyButton.svelte'
let url = ''
let markdown = ''
export let title: string =
'π-Base, a community database of topological counterexamples.'
onMount(() => {
url = window.location.href
markdown = `[${title}](${url})`
})
$: markdown = `[${title}](${$page.url})`
</script>

<div class="text-center p-2">
Expand All @@ -17,7 +12,7 @@
<span class="text-muted">
The pi-Base Community.
<cite>{title}.</cite>
Available at: {url}
Available at: {$page.url}
(Accessed: {new Date().toISOString().split('T')[0]}).
</span>
</small>
Expand Down

0 comments on commit 6958439

Please sign in to comment.