mirror of
https://github.com/Damillora/Shioriko.git
synced 2025-02-23 01:13:39 +00:00
fix: image percentage regression
This commit is contained in:
parent
8798596e91
commit
95d9a97db7
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user