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

fix(tsconfig): optimize TypeScript configuration #1052

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -49,6 +44,7 @@ body {
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}

.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
Expand Down Expand Up @@ -85,3 +81,4 @@ body {
@apply bg-background text-foreground;
}
}

19 changes: 9 additions & 10 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -15,27 +14,27 @@ export const metadata: Metadata = {

export default function RootLayout({
children,
}: Readonly<{
}: {
children: React.ReactNode;
}>) {
}) {
return (
<html lang="en">
<head>
{/* font awesome CDN */}
{/* Font Awesome CDN */}
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"
integrity="sha512-<your-integrity-hash>"
integrity="sha512-[your-integrity-hash]" // Replace with actual integrity hash
crossOrigin="anonymous"
referrerPolicy="no-referrer"
/>
</head>
<body className={`${font.className},h-screen `}>
<body className={`${font.className} h-screen`}>
<Providers>
{children}
<ScrollToTop /> {/* Added ScrollToTop component */}
<ScrollToTop />
</Providers>
</body>
</html>
);
}
}
4 changes: 2 additions & 2 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"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';

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
Expand Down
8 changes: 2 additions & 6 deletions components/Testimonials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
58 changes: 35 additions & 23 deletions components/contactUsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,38 @@ import { Button } from "./ui/button";
import { Input } from "./ui/input";
import { Textarea } from "./ui/textarea";

const ContactUsFrom = () => {
return (
<div className="flex items-center text-gray-200 lg:px-10 flex-col justify-center gap-5 md:py-8 py-4 ">
<h1 className="md:text-2xl text-lg font-nunito text-customTeal dark:text-[#75c364] mb-2 font-semibold"> Have a question or need assistance? </h1>
<Input
className="
dark:bg-gray-700
border-customTeal
dark:border-[#3A6E2E]
"
placeholder="Your Name"
/>
<Input className=" dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]" placeholder="Your Email"/>
<Input className=" dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]" placeholder="Your Subject"/>
<Textarea className=" dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]" rows={5} placeholder="Message"/>
<Button variant="default" size={"lg"} className="bg-customTeal dark:bg-Green dark:text-gray-100 dark:hover:opacity-80 md:mt-5 mb-10 lg:mb-0 text-sm md:text-md rounded-full">
Send Message
</Button>
</div>
);
}

export default ContactUsFrom;
const ContactUsForm = () => {
return (
<div className="flex flex-col items-center justify-center gap-5 py-4 md:py-8 lg:px-10 text-gray-200">
<h1 className="mb-2 text-lg font-semibold md:text-2xl font-nunito text-customTeal dark:text-[#75c364]">
Have a question or need assistance?
</h1>
<Input
className="dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]"
placeholder="Your Name"
/>
<Input
className="dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]"
placeholder="Your Email"
/>
<Input
className="dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]"
placeholder="Your Subject"
/>
<Textarea
className="dark:bg-gray-700 border-customTeal dark:border-[#3A6E2E]"
rows={5}
placeholder="Message"
/>
<Button
variant="default"
size="lg"
className="bg-customTeal dark:bg-Green dark:text-gray-100 dark:hover:opacity-80 md:mt-5 mb-10 lg:mb-0 text-sm md:text-md rounded-full"
>
Send Message
</Button>
</div>
);
};

export default ContactUsForm;
72 changes: 38 additions & 34 deletions components/contributorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,46 @@ interface ContributorCardProps {

const ContributorCard: React.FC<ContributorCardProps> = ({ contributor }) => {
return (
<div className="flex items-center justify-center w-full">
<Card className="w-full bg-gradient-to-r from-1% to-99% from-customTeal via-gray-200 to-customTeal dark:bg-gray-700 dark:bg-gradient-to-t dark:from-gray-700 to:gray-700 max-w-sm shadow-lg border border-gray-300 hover:shadow-2xl transition-transform transform hover:scale-105">
<CardHeader className="flex items-center space-x-4">
<Avatar className="h-16 w-16">
<AvatarImage src={contributor.avatar_url} alt={contributor.login} />
<AvatarFallback>{contributor.login.charAt(0)}</AvatarFallback>
</Avatar>
<div>
<CardTitle className="text-2xl text-customBlue dark:text-Green font-bold font-handlee">{contributor.login}</CardTitle>
<CardDescription className="text-sm dark:text-gray-200 font-bold text-gray-500 ">
{contributor.contributions} Contributions
</CardDescription>
</div>
</CardHeader>
<div className="flex items-center justify-center w-full">
<Card className="w-full max-w-sm bg-gradient-to-r from-customTeal via-gray-200 to-customTeal dark:bg-gray-700 dark:bg-gradient-to-t dark:from-gray-700 to-gray-700 shadow-lg border border-gray-300 hover:shadow-2xl transition-transform transform hover:scale-105">
<CardHeader className="flex items-center space-x-4">
<Avatar className="h-16 w-16">
<AvatarImage src={contributor.avatar_url} alt={contributor.login} />
<AvatarFallback>{contributor.login.charAt(0)}</AvatarFallback>
</Avatar>
<div>
<CardTitle className="text-2xl text-customBlue dark:text-Green font-bold font-handlee">
{contributor.login}
</CardTitle>
<CardDescription className="text-sm text-gray-500 font-bold dark:text-gray-200">
{contributor.contributions} Contributions
</CardDescription>
</div>
</CardHeader>

<CardContent>
<p className="text-gray-700 dark:text-gray-200">
Thank you for your valuable contributions to our community!
</p>
</CardContent>
<CardContent>
<p className="text-gray-700 dark:text-gray-200">
Thank you for your valuable contributions to our community!
</p>
</CardContent>

<CardFooter className="flex justify-between">
<Button
variant="ghost"
className="flex items-center gap-2 text-gray-700 dark:text-gray-200 hover:text-customTeal dark:hover:text-Yellow"
onClick={() => window.open(contributor.html_url, "_blank")}
>
<Github fill="black" className="h-5 text-customTeal dark:text-Yellow font-bold font-nunito w-5" />
GitHub Profile
</Button>
{/* <Button variant="outline" className="hover:bg-blue-500 hover:text-white">
<Linkedin className="h-5 w-5" />
LinkedIn
</Button> */}
</CardFooter>
</Card>
<CardFooter className="flex justify-between">
<Button
variant="ghost"
className="flex items-center gap-2 text-gray-700 dark:text-gray-200 hover:text-customTeal dark:hover:text-Yellow"
onClick={() => window.open(contributor.html_url, "_blank")}
>
<Github className="h-5 text-customTeal dark:text-Yellow" />
GitHub Profile
</Button>
{/* Uncomment and implement LinkedIn button if needed
<Button variant="outline" className="hover:bg-blue-500 hover:text-white">
<Linkedin className="h-5 w-5" />
LinkedIn
</Button>
*/}
</CardFooter>
</Card>
</div>
);
};
Expand Down
72 changes: 34 additions & 38 deletions components/features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,60 @@ const Features = () => {
const cardData = [
{
title: "Wide Product Selection",
logo: <ShoppingCart className="h-10 w-10 "/>,
decription:
"Discover a variety of products from groceries to electronics, all in one app.",
logo: <ShoppingCart className="h-10 w-10" />,
description: "Discover a variety of products from groceries to electronics, all in one app.",
},
{
title: "Local & Mall-Based Stores",
logo: <Store className="h-10 w-10 " />,
decription:
"Easily shop from your favorite local stores and top malls, all from home.",
logo: <Store className="h-10 w-10" />,
description: "Easily shop from your favorite local stores and top malls, all from home.",
},
{
title: "Seamless Ordering Process",
logo: <SendToBack className="h-10 w-10 "/>,
decription:
"Enjoy a simple and intuitive ordering system that saves you time and hassle.",
logo: <SendToBack className="h-10 w-10" />,
description: "Enjoy a simple and intuitive ordering system that saves you time and hassle.",
},
{
title: "Fast & Reliable Delivery",
logo: <Car className="h-10 w-10 "/>,
decription:
"Get your items delivered to your doorstep quickly and reliably, wherever you are.",
logo: <Car className="h-10 w-10" />,
description: "Get your items delivered to your doorstep quickly and reliably, wherever you are.",
},
{
title: "Exclusive Discounts & Offers",
logo: <TicketPercent className="h-10 w-10 "/>,
decription: "Unlock deals and discounts available only through EzyShop.",
logo: <TicketPercent className="h-10 w-10" />,
description: "Unlock deals and discounts available only through EzyShop.",
},
{
title: "Secure Payments",
logo: <CreditCard className="h-10 w-10 "/>,
decription:
"Shop with peace of mind, thanks to our safe and secure payment gateway.",
logo: <CreditCard className="h-10 w-10" />,
description: "Shop with peace of mind, thanks to our safe and secure payment gateway.",
},
];

//
return (
<div className="pt-10">
<SeperatorHeading label="Our Facilities" />
<div className="flex items-center justify-center py-10 px-4 h-full">

<div className="h-full flex flex-col gap-4 md:grid md:grid-cols-2 lg:gap-10 lg:grid-cols-3 ">
{cardData.map((card) => (
<Card key={card.title} className="min-w-[250px] max-w-[350px] shadow-md bg-gray-200 dark:bg-gray-700 ">
<CardHeader>
<div className="flex gap-2 items-center text-customTeal dark:text-Green justify-center">
return (
<div className="pt-10">
<SeperatorHeading label="Our Facilities" />
<div className="flex items-center justify-center py-10 px-4 h-full">
<div className="h-full flex flex-col gap-4 md:grid md:grid-cols-2 lg:gap-10 lg:grid-cols-3">
{cardData.map((card) => (
<Card key={card.title} className="min-w-[250px] max-w-[350px] shadow-md bg-gray-200 dark:bg-gray-700">
<CardHeader>
<div className="flex gap-2 items-center text-customTeal dark:text-Green justify-center">
{card.logo}
<CardTitle className="text-xl md:text-2xl ml-4 font-bold font-handlee text-customBlue dark:text-Yellow" >{card.title}</CardTitle>

</div>
<CardDescription className="text-xl text-gray-500 dark:text-gray-200">{card.decription}</CardDescription>
</CardHeader>
</Card>
))}
<CardTitle className="text-xl md:text-2xl ml-4 font-bold font-handlee text-customBlue dark:text-Yellow">
{card.title}
</CardTitle>
</div>
<CardDescription className="text-xl text-gray-500 dark:text-gray-200">
{card.description}
</CardDescription>
</CardHeader>
</Card>
))}
</div>
</div>
</div>
</div>
</div>
);
);
};

export default Features;
Loading