Skip to content
Snippets Groups Projects
Commit 23613b88 authored by Vincent Fontesse's avatar Vincent Fontesse
Browse files

fix(fetch): add onMount on missing fetch

parent 138d477d
No related branches found
No related tags found
3 merge requests!76Create new stable for V12,!73Create a new testing for V12,!70Resolve "incohérence dans le code partie 2"
Pipeline #53424 passed
......@@ -4,11 +4,11 @@
import {_} from 'svelte-i18n';
import BigLink from '../common/BigLink.svelte';
import Avatar from './Avatar.svelte';
import {onMount} from 'svelte';
export let author;
let structure = {};
$: fetchStructure(author);
const fetchStructure = async currentAuthor => {
if (currentAuthor?.structure) {
const responseStructure = await fetch(
......@@ -17,6 +17,7 @@
structure = await responseStructure.json();
}
};
onMount(fetchStructure);
</script>
<div class="card">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment