fix: image percentage regression

This commit is contained in:
Damillora 2025-02-22 08:20:45 +00:00
parent 8798596e91
commit 95d9a97db7

View File

@ -14,6 +14,7 @@
const getData = async () => {
const data = await getPost({ id });
post = data;
imagePercentage = ((1000 * 100) / post.width).toFixed(0) + "%";
};
const trimUrl = (str) => {
@ -50,11 +51,6 @@
};
let imagePercentage = $state("0%");
afterNavigate(() => {
if (post)
imagePercentage = ((1000 * 100) / post.width).toFixed(0) + "%";
});
</script>
{#if post}