You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a small error in the default import at ui/toaster.tsx. It imports the useToast hook as: import { useToast } from "@/components/hooks/use-toast";
However, the default installation using npx shadcn@latest add toast creates the hook at: /src/hooks/use-toast.ts
So, the correct import path in toaster.tsx should be: import { useToast } from "@/hooks/use-toast";
I was going to open an issue, but I'm not sure if I should consider it a bug; it's just a typo.
It's not a major issue, but it can be a bit annoying.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I found a small error in the default import at
ui/toaster.tsx
. It imports theuseToast
hook as:import { useToast } from "@/components/hooks/use-toast";
However, the default installation using
npx shadcn@latest add toast
creates the hook at:/src/hooks/use-toast.ts
So, the correct import path in toaster.tsx should be:
import { useToast } from "@/hooks/use-toast";
I was going to open an issue, but I'm not sure if I should consider it a bug; it's just a typo.
It's not a major issue, but it can be a bit annoying.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions