Destiner / astro-analytics

Astro components for site analytics
MIT License
110 stars 11 forks source link

`src` should be an optional prop for Plausible #17

Closed nevanscott closed 1 year ago

nevanscott commented 1 year ago

I'm not sure I've approached this the right way, but my type checker was throwing an error if I used the <Plausible> component without a src. Since there's a default, I believe this should be an optional prop, and it looks like the previous approach of defining the type as src: string | undefined was not cluing the type checker in on this. Other astro plugins I looked at were using something like the convention I used here, src?: string, so I am proposing that as a change.

I believe that this is the more correct notation for this.

Destiner commented 1 year ago

Thanks @nevanscott, makes sense to me!