ui icon indicating copy to clipboard operation
ui copied to clipboard

Fix Incorrect Hook Import Path in Toast Component Example in ShadCN Docs

Open devansh-m12 opened this issue 1 year ago • 1 comments

Summary:

This pull request addresses a documentation error found in the ShadCN website's Toast component example. Specifically, the import route for the hook is incorrect in the example. and fixes #4816

Issue:

Upon reviewing the ShadCN Toast documentation, I found that the import path for the Toast component hook was wrongly mentioned as being located in the components folder. According to the component.json file, the correct location of the hook is within the hooks folder inside the main directory.

Fix:

  • Corrected the import path in the Toast component example from components to hooks, as per the component.json file structure.

Example of Fix:

Before:

import { useToast } from "@/components/use-toast";

After:

import { useToast } from "@/hooks/use-toast";

Testing:

  • Verified that the corrected path resolves correctly.
  • Ensured the example works as expected after the change.

Impact:

This fix prevents confusion for users following the example and ensures that the import path accurately reflects the project structure, improving the overall developer experience.

devansh-m12 avatar Sep 11 '24 15:09 devansh-m12

@devansh-m12 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 11 '24 15:09 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Sep 15, 2024 8:39am

vercel[bot] avatar Sep 15 '24 08:09 vercel[bot]