diff --git a/package.json b/package.json index 78c85e2..ce7e14b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sonner", - "version": "0.1", + "version": "0.1.1", "description": "An opinionated toast component for React.", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/website/src/components/Other/Other.tsx b/website/src/components/Other/Other.tsx index e04085e..29a07b2 100644 --- a/website/src/components/Other/Other.tsx +++ b/website/src/components/Other/Other.tsx @@ -44,10 +44,10 @@ export const Other = ({ [setRichColors], ); - const [activeType, setActiveType] = React.useState(allTypes[0]); + const [activeType, setActiveType] = React.useState({} as (typeof allTypes)[0]); - const richColorsActive = activeType.name.includes('Rich'); - const closeButtonActive = activeType.name.includes('Close'); + const richColorsActive = activeType?.name?.includes('Rich'); + const closeButtonActive = activeType?.name?.includes('Close'); return (
@@ -56,7 +56,6 @@ export const Other = ({ {allTypes.map((type) => (