ui icon indicating copy to clipboard operation
ui copied to clipboard

toast componets does not apper when i try to use it

Open mohamed-abd-elkahlk opened this issue 1 year ago • 2 comments

hi there, i use toast from your components with astro and when i try to call it inside a react .tsx file like these i got nothing code when i try to submit the form it dose not show up , i try code and it still not working . i hope you to find a solution. thanks

mohamed-abd-elkahlk avatar Jan 29 '24 06:01 mohamed-abd-elkahlk

@mohamed-abd-elkahlk Did you add the Toaster component in main file?

import { Toaster } from "@/components/ui/toaster"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <head />
      <body>
        <main>{children}</main>
        <Toaster />
      </body>
    </html>
  )
}

sarkartanmay393 avatar Jan 29 '24 09:01 sarkartanmay393

@sarkartanmay393 yes in the main Layout code

mohamed-abd-elkahlk avatar Jan 29 '24 11:01 mohamed-abd-elkahlk

i solved this issue by adding clinet:idle to toaster component in main file

mohamed-abd-elkahlk avatar Feb 05 '24 17:02 mohamed-abd-elkahlk