mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
update
This commit is contained in:
parent
e937a323c6
commit
db10ab6b2d
1 changed files with 6 additions and 1 deletions
|
@ -47,6 +47,7 @@ let searchParams = null
|
|||
//let eventSelected = core.events[0].id;
|
||||
const eventSelected = writable('');
|
||||
const speakerSelected = writable('alona-shevchenko');
|
||||
const imageSelected = writable('');
|
||||
|
||||
onMount(() => {
|
||||
searchParams = new URL(document.location).searchParams;
|
||||
|
@ -59,6 +60,10 @@ onMount(() => {
|
|||
if (speaker) {
|
||||
speakerSelected.set(speaker);
|
||||
}
|
||||
const img = searchParams.get('img');
|
||||
if (img) {
|
||||
imageSelected.set(img);
|
||||
}
|
||||
});
|
||||
|
||||
eventSelected.subscribe((id, next) => {
|
||||
|
@ -73,7 +78,7 @@ eventSelected.subscribe((id, next) => {
|
|||
})
|
||||
|
||||
function getImage(eId) {
|
||||
return `/gen-img/events/${events[eId]?.image}.png`
|
||||
return `/gen-img/events/${$imageSelected ? $imageSelected : events[eId]?.image}.png`
|
||||
}
|
||||
|
||||
$: image = getImage($eventSelected);
|
||||
|
|
Loading…
Reference in a new issue