adds warning and notes

This commit is contained in:
MinamiFunakoshiTR 2025-03-13 12:41:58 -07:00
parent 6d2a4af1c6
commit 6789b4b92f
Failed to extract signature

View file

@ -169,6 +169,11 @@
sliding = false;
};
/** Keep this warning since these values are often read from an ArchieML doc, which will not trigger typescript errors even if required values don't exist */
if (!(beforeSrc && beforeAlt && afterSrc && afterAlt)) {
console.warn('Missing required src or alt props for BeforeAfter component');
}
/** @TODO - Double check if this onMount is still necessary */
// onMount(() => {
// // This is necessary b/c on:load doesn't reliably fire on the image...