Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing a component that needs useState in BentoGrid.tsx #56

Open
De-Silva-Madhushankha opened this issue Dec 20, 2024 · 0 comments
Open

Comments

@De-Silva-Madhushankha
Copy link

useState hook only works in a client component. To fix, mark the file (or its parent) with the "use client" directive.


import { useState } from "react";
import { IoCopyOutline } from "react-icons/io5";
import Lottie from "react-lottie";

import { cn } from "@/lib/utils";


import { BackgroundGradientAnimation } from "./GradientBg";
import GridGlobe from "./GridGlobe";
import animationData from "@/data/confetti.json";
import MagicButton from "./MagicButton"; ```
@De-Silva-Madhushankha De-Silva-Madhushankha changed the title importing a component that needs useState importing a component that needs useState in BentoGrid.tsx Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant