o.m
o.m
NNuxt
Created by o.m on 12/20/2024 in #❓・help
How do I get the current DOM value of useTemplateRef() ?
@kapa.ai is this possible to use without having to call onMounted?
10 replies
NNuxt
Created by o.m on 12/18/2024 in #❓・help
How do I get the updated data and display correctly?
I have to use this code for fetchingdata
const getUserTemplate = async (): Promise<any> => {
try {
const { data } = await useAsyncData(() =>
requestFetch("/api/template/user", { method: "GET" })
);

return data.value?.body?.templates;
} catch (err) {
console.log(err);
}
};
const getUserTemplate = async (): Promise<any> => {
try {
const { data } = await useAsyncData(() =>
requestFetch("/api/template/user", { method: "GET" })
);

return data.value?.body?.templates;
} catch (err) {
console.log(err);
}
};
otherwise I get hydration errors upon loading the @kapa.ai
29 replies
NNuxt
Created by o.m on 12/18/2024 in #❓・help
How do I get the updated data and display correctly?
@kapa.ai I get Cannot find name 'refresh'.ts
29 replies
NNuxt
Created by o.m on 12/18/2024 in #❓・help
How do I get the updated data and display correctly?
@kapa.ai
<div class="flex flex-wrap justify-center sm:justify-start gap-16 mt-4 mx-12 overflow-y-auto h-[28rem]">
<ClientOnly>
<Cards
v-for="(template, index) in templates"
:key="index"
:name="template.name"
@delete="handleDeleteTemplate(template.id)"
@edit="handleEditTemplate(template.id)"
@preview="handlePreviewTemplate(template.id)"
@statistics="handleStatisticsTemplate(template.id)"
/>
</ClientOnly>
</div>
<div class="flex flex-wrap justify-center sm:justify-start gap-16 mt-4 mx-12 overflow-y-auto h-[28rem]">
<ClientOnly>
<Cards
v-for="(template, index) in templates"
:key="index"
:name="template.name"
@delete="handleDeleteTemplate(template.id)"
@edit="handleEditTemplate(template.id)"
@preview="handlePreviewTemplate(template.id)"
@statistics="handleStatisticsTemplate(template.id)"
/>
</ClientOnly>
</div>
This is the complete code, of cards
29 replies
NNuxt
Created by o.m on 12/18/2024 in #❓・help
How do I get the updated data and display correctly?
@kapa.ai is refresh() even a nuxt command?
29 replies
NNuxt
Created by o.m on 12/18/2024 in #❓・help
How do I get the updated data and display correctly?
@kapa.ai why do i use await refresh(); instead of await refreshNuxtData();
29 replies
NNuxt
Created by o.m on 12/17/2024 in #❓・help
Why is it when I refresh the page I get api calls error?
Plugin runs in the client side ?
75 replies
NNuxt
Created by o.m on 12/17/2024 in #❓・help
Why is it when I refresh the page I get api calls error?
This seems to fix the issue const requestFetch = useRequestFetch();
75 replies
NNuxt
Created by o.m on 12/17/2024 in #❓・help
Why is it when I refresh the page I get api calls error?
the hydration error is fixed
75 replies
NNuxt
Created by o.m on 12/17/2024 in #❓・help
Why is it when I refresh the page I get api calls error?
You are life savior. Thank you very much for your guidance!
75 replies
NNuxt
Created by o.m on 12/17/2024 in #❓・help
Why is it when I refresh the page I get api calls error?
Thanks a lot
75 replies
NNuxt
Created by o.m on 12/17/2024 in #❓・help
Why is it when I refresh the page I get api calls error?
The const requestFetch = useRequestFetch(); really solved the backend errors
75 replies