Ray
Ray2mo ago

React useContext is not a function...

Plz, someone can help me with the error in the image? Code:
import { Chip } from "@nextui-org/react";
import Image from "next/image";
import Link from "next/link";
import { BiCopyright, BiLogoGithub, BiLogoGmail, BiLogoTiktok, BiLogoTwitter, BiLogoYoutube } from "react-icons/bi";
import { BsDiscord } from "react-icons/bs";
import { HiCube, HiHand, HiLibrary, HiUserAdd } from "react-icons/hi";
import { SiKofi } from "react-icons/si";
import SelectInput from "@/components/inputs/select-menu"

import * as DropdownMenu from '@radix-ui/react-dropdown-menu'


import TopggIcon from "@/components/icons/topgg";
import { getUser } from "@/lib/discord/user";
import cn from "@/utils/cn";
import strings, { lang } from "@/scripts/locale";
import { Context } from "@/app/provider";
import { useRouter } from "next/navigation";
import { HTMLProps, useContext, useState } from "react";


export default async function Footer(props: HTMLProps<HTMLDivElement>) {

const dev = await getUser("541072831652298752");
const { language } = useContext(Context);
// MORE CODE
import { Chip } from "@nextui-org/react";
import Image from "next/image";
import Link from "next/link";
import { BiCopyright, BiLogoGithub, BiLogoGmail, BiLogoTiktok, BiLogoTwitter, BiLogoYoutube } from "react-icons/bi";
import { BsDiscord } from "react-icons/bs";
import { HiCube, HiHand, HiLibrary, HiUserAdd } from "react-icons/hi";
import { SiKofi } from "react-icons/si";
import SelectInput from "@/components/inputs/select-menu"

import * as DropdownMenu from '@radix-ui/react-dropdown-menu'


import TopggIcon from "@/components/icons/topgg";
import { getUser } from "@/lib/discord/user";
import cn from "@/utils/cn";
import strings, { lang } from "@/scripts/locale";
import { Context } from "@/app/provider";
import { useRouter } from "next/navigation";
import { HTMLProps, useContext, useState } from "react";


export default async function Footer(props: HTMLProps<HTMLDivElement>) {

const dev = await getUser("541072831652298752");
const { language } = useContext(Context);
// MORE CODE
Solution:
My bad bro, i dont have the Context.Provider 🥲
Jump to solution
2 Replies
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Solution
Ray
Ray5w ago
My bad bro, i dont have the Context.Provider 🥲