diff --git a/src/app/globals.css b/src/app/globals.css index ced1e17..9667b39 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,6 +1,11 @@ @tailwind base; @tailwind components; @tailwind utilities; + +body { + scroll-behavior: smooth; +} + @keyframes scroll { 0% { transform: translateY(0); diff --git a/src/app/teams/create/page.tsx b/src/app/teams/create/page.tsx index 92638ed..edb8936 100644 --- a/src/app/teams/create/page.tsx +++ b/src/app/teams/create/page.tsx @@ -3,63 +3,82 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import Image from "next/image"; import { useRouter } from "next/navigation"; -import { useState } from "react"; +import { useState } from "react"; import { toast } from "sonner"; -import { useSelector } from 'react-redux'; -import { RootState } from '@/config/store'; +import { useSelector } from "react-redux"; +import { RootState } from "@/config/store"; import createAxiosInstance from "@/config/AxiosProtectedRoute"; import { createNewTeamUrl } from "@/lib/API-URLs"; function CreateTeam() { const [teamName, setTeamName] = useState(""); - const user = useSelector((state:RootState)=>state.auth.user) + const user = useSelector((state: RootState) => state.auth.user); const router = useRouter(); const axiosInstance = createAxiosInstance(user.accessToken); - const createNewTeam = async() => { + const createNewTeam = async () => { try { - const res = await axiosInstance.post(createNewTeamUrl,{ - teamName + const res = await axiosInstance.post(createNewTeamUrl, { + teamName, }); - if(res.status === 200){ - router.push('/dashboard'); + if (res.status === 200) { + router.push("/dashboard"); toast.success("Team created Successfully"); } } catch (err) { - console.log(err); } }; - + return ( -