Skip to content

Commit

Permalink
fix::sm bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasnasre committed Nov 7, 2024
1 parent 4102e53 commit b2ee02c
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 61 deletions.
7 changes: 7 additions & 0 deletions src/app/(community)/add-community/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

function page() {
return <div>page</div>;
}

export default page;
7 changes: 7 additions & 0 deletions src/app/(community)/explore-community/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

function page() {
return <div>page</div>;
}

export default page;
29 changes: 9 additions & 20 deletions src/app/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Space_Grotesk } from "next/font/google";
import { motion } from "framer-motion";
import { Mail, MapPin, Phone } from "lucide-react";
import { toast } from "sonner";
import { Button } from "@/components/ui/button";

const spaceGrotesk = Space_Grotesk({ subsets: ["latin"] });

Expand Down Expand Up @@ -85,32 +86,26 @@ function Page() {
onChange={(e) => setName(e.target.value)}
placeholder="Your Name"
required
className="w-full p-3 bg-white bg-opacity-5 rounded-xl text-white placeholder-gray-400"
className="w-full p-3 border dark:border-white border-black bg-white bg-opacity-5 rounded-xl text-white placeholder-gray-400"
/>
<input
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="Your Email"
required
className="w-full p-3 bg-white bg-opacity-5 rounded-xl text-white placeholder-gray-400"
className="w-full p-3 border dark:border-white border-black bg-white bg-opacity-5 rounded-xl text-white placeholder-gray-400"
/>
<textarea
value={message}
onChange={(e) => setMessage(e.target.value)}
placeholder="Your Message"
required
className="w-full p-3 bg-white bg-opacity-5 rounded-xl text-white placeholder-gray-400 h-32"
className="w-full p-3 border dark:border-white border-black bg-white bg-opacity-5 rounded-xl text-white placeholder-gray-400 h-32"
/>
<motion.button
type="submit"
className="w-full p-3 bg-blue-600 hover:bg-blue-700 rounded-xl text-white font-semibold transition-colors duration-300"
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
disabled={isSubmitting}
>
<Button type="submit" className="w-full" disabled={isSubmitting}>
{isSubmitting ? "Sending..." : "Send Message"}
</motion.button>
</Button>
</motion.form>

<motion.div
Expand All @@ -121,21 +116,15 @@ function Page() {
>
<div className="flex items-center space-x-4">
<Mail size={24} className="text-gray-400" />
<p className="text-xl">[email protected]</p>
</div>
<div className="flex items-center space-x-4">
<Phone size={24} className="text-gray-400" />
<p className="text-xl">+1 (123) 456-7890</p>
<p className="text-xl">[email protected]</p>
</div>
<div className="flex items-center space-x-4">
<MapPin size={24} className="text-gray-400" />
<p className="text-xl">
123 Event Street, College Town, ST 12345
</p>
<p className="text-xl">Nagpur,Maharashtra</p>
</div>
<div className="h-64 md:h-auto mt-6">
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3022.1422937950147!2d-73.98731968482413!3d40.75889497932681!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c25855c6480299%3A0x55194ec5a1ae072e!2sTimes+Square!5e0!3m2!1sen!2sus!4v1560412335839!5m2!1sen!2sus"
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d238129.6392486545!2d78.90769466099978!3d21.16132625804449!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3bd4c0a5a31faf13%3A0x19b37d06d0bb3e2b!2sNagpur%2C%20Maharashtra!5e0!3m2!1sen!2sin!4v1730995893207!5m2!1sen!2sin"
width="100%"
height="100%"
style={{ border: 0, borderRadius: "0.75rem" }}
Expand Down
15 changes: 8 additions & 7 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ const Footer: React.FC = () => {
return (
<footer className="w-full bg-black text-white py-10 px-4 md:px-10 z-[999]">
<div className="container mx-auto flex flex-col gap-8 md:flex-row justify-between items-center">
<div className="text-center md:text-left">
<Link
<div className="text-center md:text-left flex flex-col justify-center items-center">
<Link
href={"/"}
className=" transition duration-300 ease-in-out transform hover:scale-105">
className=" transition duration-300 ease-in-out transform hover:scale-105"
>
<Image
src={"/nexmeet.png"}
width={500}
Expand All @@ -24,27 +25,27 @@ const Footer: React.FC = () => {
</div>

<div className="flex justify-center md:justify-end gap-6">
<Link
{/* <Link
href="/"
target="_blank"
className="transition hover:scale-110 hover:text-blue-500"
>
<FaXTwitter className="h-6 w-6 text-white" />
</Link>
</Link> */}
<Link
href="https://github.com/TejasNasre/nexmeet"
target="_blank"
className="transition hover:scale-110 hover:text-blue-500"
>
<IoLogoGithub className="h-6 w-6 text-white" />
</Link>
<Link
{/* <Link
href="/"
target="_blank"
className="transition hover:scale-110 hover:text-blue-500"
>
<IoLogoLinkedin className="h-6 w-6 text-white" />
</Link>
</Link> */}
</div>

<div className="flex flex-col md:flex-row gap-6 text-center">
Expand Down
43 changes: 27 additions & 16 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ function Header() {
setUser(null);
});

// Retrieve theme preference from localStorage
const storedTheme = localStorage.getItem('isDarkMode');
// Retrieve theme preference from localStorage
const storedTheme = localStorage.getItem("isDarkMode");

if (storedTheme === 'true') {
setIsDarkMode(true);
document.body.classList.add("white"); // Apply dark mode class
} else {
document.body.classList.remove("white"); // Ensure dark mode class is removed
}
if (storedTheme === "true") {
setIsDarkMode(true);
document.body.classList.add("white"); // Apply dark mode class
} else {
document.body.classList.remove("white"); // Ensure dark mode class is removed
}
}, []);

const toggleMenu = () => {
Expand All @@ -64,7 +64,7 @@ function Header() {
const toggleTheme = () => {
const newTheme = !isDarkMode;
setIsDarkMode(newTheme);
localStorage.setItem('isDarkMode', String(newTheme)); // Store theme preference
localStorage.setItem("isDarkMode", String(newTheme)); // Store theme preference
document.body.classList.toggle("white");
};

Expand Down Expand Up @@ -152,7 +152,12 @@ function Header() {
<div className="flex flex-col gap-8 text-white text-center items-center">
{renderMenuItems()}
</div>
<button onClick={toggleTheme} className={isMenuOpen ? "rounded-md absolute top-5 left-4 lg:hidden" : ""}>
<button
onClick={toggleTheme}
className={
isMenuOpen ? "rounded-md absolute top-5 left-4 lg:hidden" : ""
}
>
{isDarkMode ? (
<BsBrightnessLow size={22} />
) : (
Expand All @@ -170,8 +175,8 @@ function Header() {
{ href: "/", label: "Home" },
{ href: "/explore-events", label: "Explore Events" },
{
href: "/explore-event-space",
label: "Explore Event Spaces",
href: "/explore-community",
label: "Explore Community",
requiresAuth: true,
},
{ href: "/about", label: "About Us" },
Expand Down Expand Up @@ -254,7 +259,10 @@ function Header() {
)}
</div>
</div>
<button onClick={toggleTheme} className="p-2 rounded-md hidden lg:block">
<button
onClick={toggleTheme}
className="p-2 rounded-md hidden lg:block"
>
{isDarkMode ? (
<BsBrightnessLow size={24} />
) : (
Expand All @@ -266,18 +274,21 @@ function Header() {
<>
<LoginLink
postLoginRedirectURL="/dashboard"
className="hover:scale-105 px-1 py-1 hover:border-b-2 border-white transition-colors"
className="transition ease-in-out duration-300 hover:scale-105 border-white border-double border-2 hover:border-white hover:shadow-[5px_5px_0px_0px_rgb(255,255,255)] rounded-md px-2"
>
Sign in
</LoginLink>
<RegisterLink
postLoginRedirectURL="/dashboard"
className="hover:scale-105 px-1 py-1 hover:border-b-2 border-white transition-colors"
className="transition ease-in-out duration-300 hover:scale-105 border-white border-double border-2 hover:border-white hover:shadow-[5px_5px_0px_0px_rgb(255,255,255)] rounded-md px-4"
>
Sign up
</RegisterLink>

<button onClick={toggleTheme} className="bg-black p-2 rounded-md hidden lg:block">
<button
onClick={toggleTheme}
className="bg-black p-2 rounded-md hidden lg:block"
>
{isDarkMode ? (
<BsBrightnessLow size={24} />
) : (
Expand Down
6 changes: 3 additions & 3 deletions src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CiStar } from "react-icons/ci";
import { AiFillStar } from "react-icons/ai";
import axios from "axios";
import ScrollToTop from "./Scroll-to-top";
import Faq1 from "./faq"
import Faq1 from "./faq";

const Hero: React.FC = () => {
const { isAuthenticated } = useKindeBrowserClient();
Expand Down Expand Up @@ -97,7 +97,7 @@ const Hero: React.FC = () => {
</RegisterLink>
)}
</div>
<h1 className="-mb-6">project is in development phase</h1>
{/* <h1 className="-mb-6">project is in development phase</h1> */}

<div className="text-center">
<span className="mr-4">⭐ Stars: {repoData.stars}</span>
Expand Down Expand Up @@ -228,7 +228,7 @@ const Hero: React.FC = () => {
</div>
</div>
</div>
<Faq1 />
<Faq1 />
</div>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Scroll-to-top.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const ScrollToTop = () => {
{isVisible && (
<button
onClick={scrollToTop}
className=" z-50 fixed bottom-4 right-4 w-12 h-12 bg-blue-600 text-white rounded-full shadow-lg hover:bg-blue-700 transition duration-300 flex items-center justify-center"
className="z-50 fixed bottom-4 right-4 w-10 h-10 bg-black text-white dark:bg-white dark:text-black rounded-full shadow-lg flex items-center justify-center"
>
</button>
Expand Down
29 changes: 15 additions & 14 deletions src/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";

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

const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
default:
"transition ease-in-out duration-300 hover:scale-105 dark:border-white border-black border-double border-2 hover:border-white hover:shadow-[5px_5px_0px_0px_rgb(0,0,0)] dark:hover:shadow-[5px_5px_0px_0px_rgb(255,255,255)] rounded-md p-1 md:p-2",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
"transition ease-in-out duration-300 hover:scale-105 border-white border-double border-2 hover:border-white hover:shadow-[5px_5px_0px_0px_rgb(255,255,255)] rounded-md p-1 md:p-2",
outline:
"border border-input bg-black hover:bg-white hover:text-black",
"transition ease-in-out duration-300 hover:scale-105 border-white border-double border-2 hover:border-white hover:shadow-[5px_5px_0px_0px_rgb(255,255,255)] rounded-md p-1 md:p-2",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
Expand All @@ -31,26 +32,26 @@ const buttonVariants = cva(
size: "default",
},
}
)
);

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button"
const Comp = asChild ? Slot : "button";
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
)
);
}
)
Button.displayName = "Button"
);
Button.displayName = "Button";

export { Button, buttonVariants }
export { Button, buttonVariants };

0 comments on commit b2ee02c

Please sign in to comment.