Relative Content

Tag Archive for reactjstypescriptnext.js

Nextjs build failed. Types mismatch

My app is running well. It is very slow in development mode. So i tried to build it. During build i’m getting type error. i tried to figure it out but still facing.

Type error: Type ‘Element’ is not assignable to type ‘NextPage’

“use client” import React from ‘react’; import Sidebar from ‘./page’; import type { NextPage } from ‘next’; interface LayoutProps { children: React.ReactNode; } export default function Layout({ children }: LayoutProps): NextPage<LayoutProps> { return ( <div className=”app-container”> <Sidebar /> <main className=”main-content”>{children}</main> </div> ); } `this is my code for layout.tsx in nextjs(14.2) project when i build […]

Why does my Calendar overlay view not working properly?

so I created a a popover input field for my project, the other inputs are working properly but when I tried to use CalendarPicker from shadcn, the opacity of calendar becomes zero wherein the background of the calendar is transparent. I tried copying directly from shadcn docs but its just the same.

country flag localstorage reverting back each refresh

I have implemented a language dropdown selector in my React application using the LanguageDropdown component. The component is supposed to allow users to select a language and display the corresponding flag next to the language option. However, it seems that the flags are not being displayed correctly.