From 2b41bb40e9ba29736fb9889b65ee1e2440d671d3 Mon Sep 17 00:00:00 2001 From: vishalnadarge Date: Sat, 2 Nov 2024 15:58:21 +0530 Subject: [PATCH] fix(tsconfig): optimize TypeScript configuration - Adjusted compiler options for better performance and type safety. - Set allowJs to false to enforce TypeScript usage. - Updated include paths to cover all necessary files. - Improved module resolution settings for clearer imports. --- app/globals.css | 15 +++---- app/layout.tsx | 19 +++++---- app/not-found.tsx | 4 +- components/Testimonials.tsx | 8 +--- components/contactUsForm.tsx | 58 ++++++++++++++++----------- components/contributorCard.tsx | 72 ++++++++++++++++++---------------- components/features.tsx | 72 ++++++++++++++++------------------ context/cartContext.tsx | 10 ++--- context/flashAlertContext.tsx | 18 +++++---- context/themeProvider.tsx | 23 +++++------ package.json | 8 ++-- tsconfig.json | 12 +++++- 12 files changed, 165 insertions(+), 154 deletions(-) diff --git a/app/globals.css b/app/globals.css index 1c40166b..7a27b31f 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,19 +1,14 @@ @import url('https://fonts.googleapis.com/css2?family=Handlee&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Handlee&family=Nunito:wght@400;600&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600&display=swap'); + @tailwind base; @tailwind components; @tailwind utilities; -/* -* { - outline: 1px solid red; -} */ +/* Custom font settings */ body { - font-family: sans-serif,'Handlee','Nutino'; + font-family: 'Nunito', 'Handlee', sans-serif; } -/* * { - outline: 1px solid red; -} */ @layer utilities { .text-balance { @@ -49,6 +44,7 @@ body { --chart-5: 27 87% 67%; --radius: 0.5rem; } + .dark { --background: 0 0% 3.9%; --foreground: 0 0% 98%; @@ -85,3 +81,4 @@ body { @apply bg-background text-foreground; } } + \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index f15ae26c..d856b230 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,12 +1,11 @@ import type { Metadata } from "next"; import { Urbanist } from "next/font/google"; import "./globals.css"; -import { Providers } from "@/providers/sessionProvider"; +import { Providers } from "@/providers/sessionProvider"; // Verify path and existence import 'leaflet/dist/leaflet.css'; -import ScrollToTop from '@/components/ui/ScrollToTop'; // Added import +import ScrollToTop from '@/components/ui/ScrollToTop'; // Verify path and component const font = Urbanist({ subsets: ["latin"] }); -// console.log(font.className) export const metadata: Metadata = { title: "Ezyshop", @@ -15,27 +14,27 @@ export const metadata: Metadata = { export default function RootLayout({ children, -}: Readonly<{ +}: { children: React.ReactNode; -}>) { +}) { return ( - {/* font awesome CDN */} + {/* Font Awesome CDN */} - + {children} - {/* Added ScrollToTop component */} + ); -} \ No newline at end of file +} diff --git a/app/not-found.tsx b/app/not-found.tsx index 05f589c2..fd96a89e 100644 --- a/app/not-found.tsx +++ b/app/not-found.tsx @@ -1,4 +1,4 @@ -"use client"; // Add this line at the top +"use client"; // Ensure this is added at the very top import ItemNotFound from '@/components/ui/ItemNotFound'; import { useEffect } from 'react'; @@ -6,7 +6,7 @@ import { useEffect } from 'react'; const NotFound = () => { useEffect(() => { const timer = setTimeout(() => { - window.location.href = '/'; // Redirect to homepage after 2 seconds + window.location.href = '/'; // Redirect to homepage after 1 second }, 1000); return () => clearTimeout(timer); // Cleanup the timer on component unmount diff --git a/components/Testimonials.tsx b/components/Testimonials.tsx index 3db12f90..f3d13faa 100644 --- a/components/Testimonials.tsx +++ b/components/Testimonials.tsx @@ -2,17 +2,13 @@ import { Card, CardHeader, CardContent } from "./ui/card"; import Autoplay from "embla-carousel-autoplay"; -import { - Carousel, - CarouselContent, - CarouselItem, -} from "@/components/ui/carousel"; +import { Carousel, CarouselContent, CarouselItem } from "@/components/ui/carousel"; import { Quote } from "lucide-react"; import Image from "next/image"; const reviews = [ { - text: "Managing work and kids is tough, but ezshop has been a lifesaver. I can order everything from groceries to household items without leaving home. Highly recommended!", + text: "Managing work and kids is tough, but Ezshop has been a lifesaver. I can order everything from groceries to household items without leaving home. Highly recommended!", name: "Priya Nair", role: "Mother of Two", image: "/priya.jpg", diff --git a/components/contactUsForm.tsx b/components/contactUsForm.tsx index 5e932241..67dba078 100644 --- a/components/contactUsForm.tsx +++ b/components/contactUsForm.tsx @@ -2,26 +2,38 @@ import { Button } from "./ui/button"; import { Input } from "./ui/input"; import { Textarea } from "./ui/textarea"; -const ContactUsFrom = () => { - return ( -
-

Have a question or need assistance?

- - - -