+
{!bracketCreated ? (
) : (
)}
- )
+ );
}
-
diff --git a/components/Contatct/Contact-left.jsx b/components/Contatct/Contact-left.jsx
new file mode 100644
index 0000000..f3b6b5a
--- /dev/null
+++ b/components/Contatct/Contact-left.jsx
@@ -0,0 +1,46 @@
+import cn from "classnames";
+import Image from "next/image";
+import Link from "next/link";
+import { socialLinks } from "../Footer";
+
+export default function ContactLeftComp({ className }) {
+ return (
+
+
+
+
+
+ The Go-To Esports Platform at the intersection of esports and mental
+ well-being
+
+
+
+ {socialLinks.map((e, i) => {
+ return (
+
+
+
+ );
+ })}
+
+
+
+ );
+}
diff --git a/components/Contatct/Contact-right.jsx b/components/Contatct/Contact-right.jsx
new file mode 100644
index 0000000..a4054a6
--- /dev/null
+++ b/components/Contatct/Contact-right.jsx
@@ -0,0 +1,165 @@
+"use form";
+
+import cn from "classnames";
+import { useForm } from "react-hook-form";
+import { zodResolver } from "@hookform/resolvers/zod";
+import z from "zod";
+
+import { Button } from "../../@/components/ui/button";
+import {
+ Form,
+ FormControl,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "../../@/components/ui/form";
+import { Input } from "../../@/components/ui/input";
+import { Mail, PhoneCall, UserRoundCog } from "lucide-react";
+import { Textarea } from "../../@/components/ui/textarea";
+import { BiSupport } from "react-icons/bi";
+import Link from "next/link";
+import { socialLinks } from "../Footer";
+
+const formSchema = z.object({
+ fullName: z
+ .string({ message: "Full name is required" })
+ .min(3, { message: "Make it little longer" }),
+ email: z
+ .string({ message: "Email is required" })
+ .email({ message: "Invalid email type" }),
+ message: z
+ .string({ message: "Give some sort of message" })
+ .min(3, { message: "Make it little longer" }),
+});
+
+export default function ContactRightComp({ className }) {
+ const form = useForm({
+ resolver: zodResolver(formSchema),
+ defaultValues: {
+ fullName: "",
+ email: "",
+ message: "",
+ },
+ });
+
+ async function handleFormSubmission(data) {
+ try {
+ console.log(data);
+ } catch (error) {
+ console.log(error);
+ }
+ }
+ return (
+
+
GET IN TOUCH
+
+ 24/7 We will answer your questions and problems
+
+
+
+
+
+
+
+
+
+
+
support@sanityesports.live
+
+
+
+
+
contact@sanityesports.live
+
+
+
+
+ {socialLinks.map((e, i) => {
+ return (
+
+
+
+ );
+ })}
+
+
+ );
+}
diff --git a/components/Footer.jsx b/components/Footer.jsx
index ee197f7..4e9e0c3 100644
--- a/components/Footer.jsx
+++ b/components/Footer.jsx
@@ -5,7 +5,7 @@ import React from "react";
import Link from "next/link";
import { FaDiscord, FaInstagram, FaLinkedin, FaYoutube } from "react-icons/fa";
-const socialLinks = [
+export const socialLinks = [
{
title: "instagram",
icon: FaInstagram,
diff --git a/components/ui/select.jsx b/components/ui/select.jsx
index d97464b..3e1ae4e 100644
--- a/components/ui/select.jsx
+++ b/components/ui/select.jsx
@@ -18,7 +18,7 @@ const SelectTrigger = React.forwardRef(
ref={ref}
className={cn(
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
- className
+ className,
)}
{...props}
>
@@ -27,7 +27,7 @@ const SelectTrigger = React.forwardRef(
- )
+ ),
);
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
@@ -35,12 +35,15 @@ const SelectScrollUpButton = React.forwardRef(
({ className, ...props }, ref) => (
- )
+ ),
);
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
@@ -48,14 +51,18 @@ const SelectScrollDownButton = React.forwardRef(
({ className, ...props }, ref) => (
- )
+ ),
);
-SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
+SelectScrollDownButton.displayName =
+ SelectPrimitive.ScrollDownButton.displayName;
const SelectContent = React.forwardRef(
({ className, children, position = "popper", ...props }, ref) => (
@@ -66,7 +73,7 @@ const SelectContent = React.forwardRef(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
- className
+ className,
)}
position={position}
{...props}
@@ -76,7 +83,7 @@ const SelectContent = React.forwardRef(
className={cn(
"p-1",
position === "popper" &&
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
)}
>
{children}
@@ -84,19 +91,17 @@ const SelectContent = React.forwardRef(
- )
+ ),
);
SelectContent.displayName = SelectPrimitive.Content.displayName;
-const SelectLabel = React.forwardRef(
- ({ className, ...props }, ref) => (
-
- )
-);
+const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
+
+));
SelectLabel.displayName = SelectPrimitive.Label.displayName;
const SelectItem = React.forwardRef(
@@ -105,7 +110,7 @@ const SelectItem = React.forwardRef(
ref={ref}
className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
- className
+ className,
)}
{...props}
>
@@ -116,19 +121,17 @@ const SelectItem = React.forwardRef(
{children}
- )
+ ),
);
SelectItem.displayName = SelectPrimitive.Item.displayName;
-const SelectSeparator = React.forwardRef(
- ({ className, ...props }, ref) => (
-
- )
-);
+const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (
+
+));
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
export {
diff --git a/lib/utils/index.js b/lib/utils/index.js
index 3bef539..a5f7b82 100644
--- a/lib/utils/index.js
+++ b/lib/utils/index.js
@@ -1,15 +1,14 @@
-import qs from "query-string"
-
+import qs from "query-string";
export const formUrlQuery = ({ params, key, value }) => {
- const currentUrl = qs.parse(params);
- currentUrl[key] = value;
-
- return qs.stringifyUrl(
- {
- url: window.location.pathname,
- query: currentUrl
- },
- { skipNull: true }
- );
- };
\ No newline at end of file
+ const currentUrl = qs.parse(params);
+ currentUrl[key] = value;
+
+ return qs.stringifyUrl(
+ {
+ url: window.location.pathname,
+ query: currentUrl,
+ },
+ { skipNull: true },
+ );
+};
diff --git a/model/Bracket.js b/model/Bracket.js
index 8a05693..db8dcae 100644
--- a/model/Bracket.js
+++ b/model/Bracket.js
@@ -2,11 +2,15 @@ const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const BracketSchema = new Schema({
- tournamentName: { type: String, required: true },
- BracketNumber: {type: Number, required: true},
- consolationFinal: {type: Boolean, required: true},
- grandFinalType: { type: String, enum: ['none', 'simple', 'double'], required: true },
- createdAt: { type: Date, default: Date.now }
+ tournamentName: { type: String, required: true },
+ BracketNumber: { type: Number, required: true },
+ consolationFinal: { type: Boolean, required: true },
+ grandFinalType: {
+ type: String,
+ enum: ["none", "simple", "double"],
+ required: true,
+ },
+ createdAt: { type: Date, default: Date.now },
});
module.exports =
diff --git a/package-lock.json b/package-lock.json
index 0413621..ae961ac 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,18 +8,18 @@
"name": "sanity",
"version": "0.1.0",
"dependencies": {
- "@hookform/resolvers": "^3.7.0",
+ "@hookform/resolvers": "^3.9.1",
"@material-tailwind/react": "2.1.9",
"@portabletext/react": "3.0.18",
"@radix-ui/react-avatar": "^1.1.2",
"@radix-ui/react-dialog": "1.1.1",
"@radix-ui/react-dropdown-menu": "2.1.1",
"@radix-ui/react-icons": "1.3.0",
- "@radix-ui/react-label": "2.1.0",
+ "@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.4",
"@radix-ui/react-select": "2.1.1",
"@radix-ui/react-separator": "^1.1.1",
- "@radix-ui/react-slot": "1.1.0",
+ "@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-toast": "1.2.1",
"@tabler/icons": "1.115.0",
"@tabler/icons-react": "3.11.0",
@@ -29,6 +29,7 @@
"bcryptjs": "2.4.3",
"brackets-viewer": "^1.6.2",
"class-variance-authority": "0.7.0",
+ "classnames": "^2.5.1",
"clsx": "2.1.1",
"cobe": "0.6.3",
"dotenv": "16.4.5",
@@ -43,7 +44,7 @@
"nextjs-toploader": "1.6.12",
"react": "18.3.0",
"react-dom": "18.3.0",
- "react-hook-form": "^7.52.1",
+ "react-hook-form": "^7.54.2",
"react-icons": "5.2.1",
"react-loading-skeleton": "3.4.0",
"react-spinners": "^0.15.0",
@@ -52,7 +53,7 @@
"tailwind-merge": "2.4.0",
"tailwindcss-animate": "1.0.7",
"usehooks-ts": "3.1.0",
- "zod": "^3.23.8"
+ "zod": "^3.24.1"
},
"devDependencies": {
"@tailwindcss/typography": "0.5.13",
@@ -2540,9 +2541,9 @@
"integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig=="
},
"node_modules/@hookform/resolvers": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.7.0.tgz",
- "integrity": "sha512-42p5X18noBV3xqOpTlf2V5qJZwzNgO4eLzHzmKGh/w7z4+4XqRw5AsESVkqE+qwAuRRlg2QG12EVEjPkrRIbeg==",
+ "version": "3.9.1",
+ "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.9.1.tgz",
+ "integrity": "sha512-ud2HqmGBM0P0IABqoskKWI6PEf6ZDDBZkFqe2Vnl+mTHCEHzr3ISjjZyCwTjC/qpL25JC9aIDkloQejvMeq0ug==",
"license": "MIT",
"peerDependencies": {
"react-hook-form": "^7.0.0"
@@ -3083,6 +3084,12 @@
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==",
"optional": true
},
+ "node_modules/@material-tailwind/react/node_modules/classnames": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
+ "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==",
+ "license": "MIT"
+ },
"node_modules/@material-tailwind/react/node_modules/framer-motion": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz",
@@ -8045,9 +8052,10 @@
}
},
"node_modules/classnames": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
- "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
+ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==",
+ "license": "MIT"
},
"node_modules/cli-cursor": {
"version": "3.1.0",
@@ -15018,12 +15026,12 @@
}
},
"node_modules/react-hook-form": {
- "version": "7.52.1",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.52.1.tgz",
- "integrity": "sha512-uNKIhaoICJ5KQALYZ4TOaOLElyM+xipord+Ha3crEFhTntdLvWZqVY49Wqd/0GiVCA/f9NjemLeiNPjG7Hpurg==",
+ "version": "7.54.2",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.54.2.tgz",
+ "integrity": "sha512-eHpAUgUjWbZocoQYUHposymRb4ZP6d0uwUnooL2uOybA9/3tPUvoAKqEWK1WaSiTxxOfTpffNZP7QwlnM3/gEg==",
"license": "MIT",
"engines": {
- "node": ">=12.22.0"
+ "node": ">=18.0.0"
},
"funding": {
"type": "opencollective",
@@ -18578,9 +18586,9 @@
}
},
"node_modules/zod": {
- "version": "3.23.8",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
- "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
+ "version": "3.24.1",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz",
+ "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
diff --git a/package.json b/package.json
index 6359053..d84b554 100644
--- a/package.json
+++ b/package.json
@@ -12,18 +12,18 @@
"prepare": "husky"
},
"dependencies": {
- "@hookform/resolvers": "^3.7.0",
+ "@hookform/resolvers": "^3.9.1",
"@material-tailwind/react": "2.1.9",
"@portabletext/react": "3.0.18",
"@radix-ui/react-avatar": "^1.1.2",
"@radix-ui/react-dialog": "1.1.1",
"@radix-ui/react-dropdown-menu": "2.1.1",
"@radix-ui/react-icons": "1.3.0",
- "@radix-ui/react-label": "2.1.0",
+ "@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.4",
"@radix-ui/react-select": "2.1.1",
"@radix-ui/react-separator": "^1.1.1",
- "@radix-ui/react-slot": "1.1.0",
+ "@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-toast": "1.2.1",
"@tabler/icons": "1.115.0",
"@tabler/icons-react": "3.11.0",
@@ -33,6 +33,7 @@
"bcryptjs": "2.4.3",
"brackets-viewer": "^1.6.2",
"class-variance-authority": "0.7.0",
+ "classnames": "^2.5.1",
"clsx": "2.1.1",
"cobe": "0.6.3",
"dotenv": "16.4.5",
@@ -47,7 +48,7 @@
"nextjs-toploader": "1.6.12",
"react": "18.3.0",
"react-dom": "18.3.0",
- "react-hook-form": "^7.52.1",
+ "react-hook-form": "^7.54.2",
"react-icons": "5.2.1",
"react-loading-skeleton": "3.4.0",
"react-spinners": "^0.15.0",
@@ -56,7 +57,7 @@
"tailwind-merge": "2.4.0",
"tailwindcss-animate": "1.0.7",
"usehooks-ts": "3.1.0",
- "zod": "^3.23.8"
+ "zod": "^3.24.1"
},
"devDependencies": {
"@tailwindcss/typography": "0.5.13",
@@ -75,4 +76,4 @@
"prisma": {
"seed": "node prisma/seed.js"
}
-}
\ No newline at end of file
+}
diff --git a/public/contact.jpg b/public/contact.jpg
new file mode 100644
index 0000000..6992e32
Binary files /dev/null and b/public/contact.jpg differ