From 71381f0396c0a3887d88f5a4431564bc522de22f Mon Sep 17 00:00:00 2001 From: bacpactech Date: Tue, 1 Oct 2024 16:10:53 +0530 Subject: [PATCH 1/2] fix: timeline and added landing page --- .../community/[id]/page.tsx | 10 +- .../communityGroup/[group_id]/page.tsx | 5 + src/app/(withLayout)/layout.tsx | 10 +- src/app/(withLayout)/timeline/page.tsx | 2 +- src/app/layout.tsx | 2 +- src/app/login/page.tsx | 113 +- .../[id]/connections/page.tsx | 0 .../[id]/page.tsx | 0 .../{community => old-community}/loading.tsx | 0 src/app/{community => old-community}/page.tsx | 0 src/app/old-login/page.tsx | 115 ++ src/app/old-register/page.tsx | 244 ++++ src/app/{v2 => }/onboarding/page.tsx | 0 src/app/page.tsx | 252 +++- src/app/{v2 => }/register/loading.tsx | 0 src/app/register/page.tsx | 265 +--- src/app/v2/login/page.tsx | 12 - src/app/v2/register/page.tsx | 37 - src/app/v2/timeline/page.tsx | 16 - src/assets/landing-mobile.svg | 1281 +++++++++++++++++ src/assets/lightningIcon.svg | 3 + src/assets/section-3.svg | 9 + src/assets/section-4.svg | 15 + src/assets/section-5.svg | 10 + src/components/atoms/LoginButtons/index.tsx | 2 +- src/components/atoms/LogoNavbar/index.tsx | 171 ++- .../communityUniversity/CreateNewGroup.tsx | 1 - .../communityUniversity/GroupSelectors.tsx | 19 +- .../messages/UserMessageContainer.tsx | 2 +- .../molecules/NavbarUniversityItem/index.tsx | 82 +- .../molecules/SubscribedUniversity/index.tsx | 2 +- src/components/molecules/Tabs/index.tsx | 4 +- src/components/organisms/LeftNavbar/index.tsx | 78 +- .../organisms/PostsContainer/index.tsx | 102 +- src/services/community-university.ts | 2 +- .../userProfileSlice/userProfileSlice.ts | 2 +- src/store/userProfileSlice/userProfileType.ts | 2 +- tailwind.config.js | 17 +- 38 files changed, 2214 insertions(+), 673 deletions(-) rename src/app/{v2 => (withLayout)}/community/[id]/page.tsx (84%) create mode 100644 src/app/(withLayout)/communityGroup/[group_id]/page.tsx rename src/app/{community => old-community}/[id]/connections/page.tsx (100%) rename src/app/{community => old-community}/[id]/page.tsx (100%) rename src/app/{community => old-community}/loading.tsx (100%) rename src/app/{community => old-community}/page.tsx (100%) create mode 100644 src/app/old-login/page.tsx create mode 100644 src/app/old-register/page.tsx rename src/app/{v2 => }/onboarding/page.tsx (100%) rename src/app/{v2 => }/register/loading.tsx (100%) delete mode 100644 src/app/v2/login/page.tsx delete mode 100644 src/app/v2/register/page.tsx delete mode 100644 src/app/v2/timeline/page.tsx create mode 100644 src/assets/landing-mobile.svg create mode 100644 src/assets/lightningIcon.svg create mode 100644 src/assets/section-3.svg create mode 100644 src/assets/section-4.svg create mode 100644 src/assets/section-5.svg diff --git a/src/app/v2/community/[id]/page.tsx b/src/app/(withLayout)/community/[id]/page.tsx similarity index 84% rename from src/app/v2/community/[id]/page.tsx rename to src/app/(withLayout)/community/[id]/page.tsx index 01e63602..9a757dba 100644 --- a/src/app/v2/community/[id]/page.tsx +++ b/src/app/(withLayout)/community/[id]/page.tsx @@ -1,13 +1,15 @@ -import LeftNavWrapper from '@/components/molecules/LeftNavWrapper' +'use client' import UniversityCard from '@/components/molecules/UniversityCard' import PostContainer from '@/components/organisms/PostsContainer' import UserPostContainer from '@/components/organisms/UserPostContainer' import { PostInputType } from '@/types/constants' +import { useParams } from 'next/navigation' import React from 'react' const Community = () => { + const { id } = useParams() return ( - + <> { memberCount={200} /> - - + + ) } diff --git a/src/app/(withLayout)/communityGroup/[group_id]/page.tsx b/src/app/(withLayout)/communityGroup/[group_id]/page.tsx new file mode 100644 index 00000000..36ef33be --- /dev/null +++ b/src/app/(withLayout)/communityGroup/[group_id]/page.tsx @@ -0,0 +1,5 @@ +import React from 'react' + +export default function CommunityGroup() { + return
CommunityGroup
+} diff --git a/src/app/(withLayout)/layout.tsx b/src/app/(withLayout)/layout.tsx index 1b308675..48a73a88 100644 --- a/src/app/(withLayout)/layout.tsx +++ b/src/app/(withLayout)/layout.tsx @@ -3,12 +3,14 @@ import React, { useState } from 'react' export default function Layout({ children }: { children: React.ReactNode }) { return ( -
-
- +
+
+
+ +
{children}
-
+
) } diff --git a/src/app/(withLayout)/timeline/page.tsx b/src/app/(withLayout)/timeline/page.tsx index 46b5476d..9427c0b3 100644 --- a/src/app/(withLayout)/timeline/page.tsx +++ b/src/app/(withLayout)/timeline/page.tsx @@ -7,7 +7,7 @@ export default function Timeline() { return ( <> - + ) } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 1f112182..f6adf704 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -54,7 +54,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) - + diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 61b37dd9..502e85c9 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,114 +1,11 @@ -/* eslint-disable @next/next/no-img-element */ -'use client' -import Footer from '@components/Footer/Footer' -import { useForm, SubmitHandler } from 'react-hook-form' -import { useEffect, useState } from 'react' -import { AiOutlineEye } from 'react-icons/ai' -import { AiOutlineEyeInvisible } from 'react-icons/ai' -import Link from 'next/link' -import { useHandleLogin } from '@/services/auth' -import { LoginForm } from '@/models/auth' -// import { useUniStore } from '@/store/store' -import { useRouter } from 'next/navigation' -import { ButtonPrimary } from '@/components/Buttons/PrimaryButton' +import LoginBox from '@/components/organism/Login/LoginBox' +import React from 'react' const Login = () => { - const [showPassword, setShowPassword] = useState(false) - const { mutate: mutateLogin, isSuccess } = useHandleLogin() - const { - register: registerLogin, - handleSubmit: handleSubmitLogin, - formState: { errors: loginErrors }, - } = useForm() - // const { userProfileData } = useUniStore() - const router = useRouter() - - const onLoginSubmit: SubmitHandler = async (data) => { - await mutateLogin(data) - // if (userProfileData?._id) { - // router.push(`/community/${userProfileData._id}/timeline`) - // } else { - // console.error('User profile data is missing or invalid.') - // } - } - - useEffect(() => { - if (isSuccess) { - router.push(`/timeline`) - } - }, [isSuccess]) - return ( -
-
-
-
- uniBuzz Logo -
-

Login to your account

-
- - - {loginErrors.email && ( - {loginErrors.email.message ? loginErrors.email.message : 'Please enter your email!'} - )} - - {/* include validation with required or other standard HTML validation rules */} -
- -
- {showPassword ? ( - setShowPassword(!showPassword)} /> - ) : ( - setShowPassword(!showPassword)} /> - )} -
-
- {/* errors will return when field validation fails */} - {loginErrors.password && Please enter your password!} -

Forgot Password?

- {/* checkbox for remember me */} - {/*
-
- -
- -
*/} - - Login - -

- Don't have an account?{' '} - - Sign Up - -

-
-
-
-
-
+
+ +
) } diff --git a/src/app/community/[id]/connections/page.tsx b/src/app/old-community/[id]/connections/page.tsx similarity index 100% rename from src/app/community/[id]/connections/page.tsx rename to src/app/old-community/[id]/connections/page.tsx diff --git a/src/app/community/[id]/page.tsx b/src/app/old-community/[id]/page.tsx similarity index 100% rename from src/app/community/[id]/page.tsx rename to src/app/old-community/[id]/page.tsx diff --git a/src/app/community/loading.tsx b/src/app/old-community/loading.tsx similarity index 100% rename from src/app/community/loading.tsx rename to src/app/old-community/loading.tsx diff --git a/src/app/community/page.tsx b/src/app/old-community/page.tsx similarity index 100% rename from src/app/community/page.tsx rename to src/app/old-community/page.tsx diff --git a/src/app/old-login/page.tsx b/src/app/old-login/page.tsx new file mode 100644 index 00000000..61b37dd9 --- /dev/null +++ b/src/app/old-login/page.tsx @@ -0,0 +1,115 @@ +/* eslint-disable @next/next/no-img-element */ +'use client' +import Footer from '@components/Footer/Footer' +import { useForm, SubmitHandler } from 'react-hook-form' +import { useEffect, useState } from 'react' +import { AiOutlineEye } from 'react-icons/ai' +import { AiOutlineEyeInvisible } from 'react-icons/ai' +import Link from 'next/link' +import { useHandleLogin } from '@/services/auth' +import { LoginForm } from '@/models/auth' +// import { useUniStore } from '@/store/store' +import { useRouter } from 'next/navigation' +import { ButtonPrimary } from '@/components/Buttons/PrimaryButton' + +const Login = () => { + const [showPassword, setShowPassword] = useState(false) + const { mutate: mutateLogin, isSuccess } = useHandleLogin() + const { + register: registerLogin, + handleSubmit: handleSubmitLogin, + formState: { errors: loginErrors }, + } = useForm() + // const { userProfileData } = useUniStore() + const router = useRouter() + + const onLoginSubmit: SubmitHandler = async (data) => { + await mutateLogin(data) + // if (userProfileData?._id) { + // router.push(`/community/${userProfileData._id}/timeline`) + // } else { + // console.error('User profile data is missing or invalid.') + // } + } + + useEffect(() => { + if (isSuccess) { + router.push(`/timeline`) + } + }, [isSuccess]) + + return ( +
+
+
+
+ uniBuzz Logo +
+

Login to your account

+
+ + + {loginErrors.email && ( + {loginErrors.email.message ? loginErrors.email.message : 'Please enter your email!'} + )} + + {/* include validation with required or other standard HTML validation rules */} +
+ +
+ {showPassword ? ( + setShowPassword(!showPassword)} /> + ) : ( + setShowPassword(!showPassword)} /> + )} +
+
+ {/* errors will return when field validation fails */} + {loginErrors.password && Please enter your password!} +

Forgot Password?

+ {/* checkbox for remember me */} + {/*
+
+ +
+ +
*/} + + Login + +

+ Don't have an account?{' '} + + Sign Up + +

+
+
+
+
+
+ ) +} + +export default Login diff --git a/src/app/old-register/page.tsx b/src/app/old-register/page.tsx new file mode 100644 index 00000000..37922743 --- /dev/null +++ b/src/app/old-register/page.tsx @@ -0,0 +1,244 @@ +/* eslint-disable @next/next/no-img-element */ +'use client' +import Footer from '@components/Footer/Footer' +import Link from 'next/link' +import { useForm, SubmitHandler } from 'react-hook-form' +import { useState } from 'react' +import { AiOutlineEye } from 'react-icons/ai' +import { AiOutlineEyeInvisible } from 'react-icons/ai' +import { RegisterForm } from '@/models/auth' +import { useHandleRegister } from '@/services/auth' +import { ButtonPrimary } from '@/components/Buttons/PrimaryButton' + +const SignUp = () => { + const [showPassword, setShowPassword] = useState(false) + const [showConfirmPassword, setShowConfirmPassword] = useState(false) + const [acceptTnC, setAcceptTnC] = useState(false) + const { mutate: mutateRegister } = useHandleRegister() + const { + register: registerSignup, + handleSubmit: handleSubmitSignup, + formState: { errors: signupErrors }, + watch, + } = useForm() + + // Get the current values of password and confirmPassword + const password = watch('password') + + const onSignupSubmit: SubmitHandler = (data) => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const { confirmPassword, tnc, ...signupData } = data + mutateRegister(signupData) + } + + return ( +
+
+
+
+ uniBuzz Logo +
+

Sign Up

+

Start your journey with us by creating an account!

+
+ + + {signupErrors.firstName && Please enter your first name!} + + + {signupErrors.lastName && Please enter your last name!} + + + {signupErrors.email && ( + {signupErrors.email.message ? signupErrors.email.message : 'Please enter your email!'} + )} + + {/* TODO: make it a dropdown */} + + {signupErrors.gender && Please enter your Gender!} + + + {signupErrors.dob && Please enter your birth date!} + + + {signupErrors.country && Please enter your Country!} + + + {signupErrors.city && Please enter your City!} + +
+ +
+ {showPassword ? ( + setShowPassword(!showPassword)} /> + ) : ( + setShowPassword(!showPassword)} /> + )} +
+
+ {signupErrors.password && ( +
+ + {signupErrors.password.message ? signupErrors.password.message : 'Please enter your password!'} + +
+ )} + +
+ value === password || 'Passwords do not match', + })} + placeholder="Password" + className=" border pl-3 py-2 text-md rounded-lg border-gray-light font-normal w-full" + type={showConfirmPassword ? 'text' : 'password'} + /> +
+ {showConfirmPassword ? ( + setShowConfirmPassword(!showConfirmPassword)} + /> + ) : ( + setShowConfirmPassword(!showConfirmPassword)} /> + )} +
+
+ {signupErrors.confirmPassword && {signupErrors.confirmPassword.message}} + + +
+

+ Welcome to UniBuzz, a [brief description of your product/service]. These Terms and Conditions ("Terms") govern your access + to and use of UniBuzz Network Pvt Ltd (hereon referred to as UniBuzz Networks) website, mobile application, and related services + (collectively, the "Service"). By accessing or using the Service, you agree to be bound by these Terms, our Privacy Policy, + and any additional terms applicable to certain features of the Service, which are incorporated herein by reference. By creating an + account, accessing, or Lorem ipsum dolor sit amet consectetur adipisicing elit. Vel modi et porro quo aut fugiat reprehenderit quod, + voluptate consequatur, voluptatum repellat quidem. Voluptatem, corporis mollitia laborum ab cumque quaerat soluta! Lorem ipsum dolor + sit amet, consectetur adipisicing elit. Porro, maxime sint inventore laudantium quos non libero unde. Modi, necessitatibus. Debitis + quisquam reprehenderit velit necessitatibus, maxime doloremque molestiae numquam accusamus ducimus. +

+
+ +
+

+ Welcome to UniBuzz, a [brief description of your product/service]. These Terms and Conditions ("Terms") govern your access + to and use of UniBuzz Network Pvt Ltd (hereon referred to as UniBuzz Networks) website, mobile application, and related services + (collectively, the "Service"). By accessing or using the Service, you agree to be bound by these Terms, our Privacy Policy, + and any additional terms applicable to certain features of the Service, which are incorporated herein by reference. By creating an + account, accessing, or Lorem ipsum dolor sit amet consectetur adipisicing elit. Neque, et, dolorem eaque, id enim laboriosam + architecto accusamus odit velit dolorum aut? Adipisci vel nisi libero! Beatae earum a illum modi?Lorem ipsum dolor sit amet + consectetur, adipisicing elit. Ea incidunt distinctio officia architecto. Officiis iure quia repudiandae culpa veniam non nemo + consequatur ut? Obcaecati, nisi. Soluta, maxime eligendi! Soluta, enim. +

+
+ {/* checkbox for remember me */} +
+
+ setAcceptTnC(!acceptTnC)} + className="mr-2" + /> +
+ +
+ {signupErrors.tnc && Required!} + {/**/} + Signd Up +

+ Already a member?{' '} + + Sign In + +

+
+
+
+
+
+ ) +} + +export default SignUp diff --git a/src/app/v2/onboarding/page.tsx b/src/app/onboarding/page.tsx similarity index 100% rename from src/app/v2/onboarding/page.tsx rename to src/app/onboarding/page.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index 722337d1..439cd147 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,92 +1,190 @@ 'use client' - -import './page.css' -import { useState } from 'react' - -import Footer from '../components/Footer/Footer' -import SearchBar from '../components/SearchBar' -import Section2 from '../components/Section-2/Section2' -import Section3 from '../components/Section-3/Section3' -import Sections from '../components/Sections/Sections' -import { motion } from 'framer-motion' -import StarIcon from '../assets/stars.svg' import Image from 'next/image' -import DiscordIcon from '@assets/discord.svg' -import { ButtonPrimary } from '@/components/Buttons/PrimaryButton' - -export default function Home() { - const [searchOpen, setSearchOpen] = useState(false) +import React from 'react' +import bannerImage from '@assets/landing-mobile.svg' +import section3 from '@assets/section-3.svg' +import section4 from '@assets/section-4.svg' +import section5 from '@assets/section-5.svg' +import lightningIcon from '@assets/lightningIcon.svg' +import Title from '@/components/atoms/Title' +import { FaCheckCircle } from 'react-icons/fa' +import { motion } from 'framer-motion' +import LoginButtons from '@/components/atoms/LoginButtons' - const LANDING_PAGE_TEXT = ' Search universities worldwide and become part of their online communities'.split(' ') +export default function LandingPage() { + const contentVariants = { + hidden: { x: '-100vw', opacity: 0 }, + visible: { + x: 0, + opacity: 1, + transition: { type: 'twin', stiffness: 50 }, + }, + } return ( -
-
setSearchOpen(!searchOpen)} - > -
-
- {LANDING_PAGE_TEXT.map((el, i) => ( - - {el}{' '} - - ))} +
+
+ +

YOU'RE ALMOST THERE

+ Search your university! +

+ University not listed? Send us feedback and we will add your university to the database, along with extra perks for you +

+
+ +
+
+ + {bannerImage} + +
+ {/*Section 2*/} +
+ Connect, Collaborate, and Elevate with Unibuzz +

Familiarize yourself with Unibuzz’s mission and purpose.

+
+ {/*Section 3 Connect*/} +
+
+
+ {lightningIcon} +

Connect

+
+
+

+ Courses, clubs, circles and more. Join all the groups imaginable. +

+
    +
  • +
    + +
    +

    Join university groups or create your own

    +
  • +
  • +
    + +
    +

    Distinguish between university approved groups and casual groups

    +
  • +
  • +
    + +
    +

    All social networking done within these groups

    +
  • +
+
+
+
+ {section3} +
+
+ {/*Section 4*/} +
+
+ {section4} +
+
+
+ {lightningIcon} +

Collaborate

- -
-
-
- start icon -
-
-

Already part of your university community?

-
-
-
- Login -
-
- - -
+
+

+ Create new connections and freely message with others. +

+
    +
  • +
    + +
    +

    Private messages, group messages, and forum posts

    +
  • +
  • +
    + +
    +

    Connect with people you know and keep up with their university life

    +
  • +
  • +
    + +
    +

    Edit your profile to your liking; university life is a fresh start

    +
  • +
-
- - - -
-
-
-

STILL HAVE QUESTIONS?

-

Get to know us better

-

Familiarize yourself with Unibuzz's mission and purpose

+
+ + {/*Section 5 Connect*/} +
+
+
+ {lightningIcon} +

Elevate

-
-
- -
-
- -
+
+

+ Use our AI assistant among other features to enrich your university life. +

+
    +
  • +
    + +
    +

    AI assistant that answers all questions related to your university

    +
  • +
  • +
    + +
    +

    LaTeX syntax for academic for communication of scientific documents and technical note-taking

    +
  • +
  • +
    + +
    +

    Move up to 5gb of files within platform for ebooks, research data, etc

    +
  • +
+
+ {section5} +
+
+ {/*section 6*/} +
+
+

BECOME A PART OF YOUR UNIVERSITY

+
+
+ Create an Account to Get Started +
+
+

Search universities worldwide and become part of their online communities

+
+
+ Get Started + Get Started +
-
) } diff --git a/src/app/v2/register/loading.tsx b/src/app/register/loading.tsx similarity index 100% rename from src/app/v2/register/loading.tsx rename to src/app/register/loading.tsx diff --git a/src/app/register/page.tsx b/src/app/register/page.tsx index 37922743..3e744ccb 100644 --- a/src/app/register/page.tsx +++ b/src/app/register/page.tsx @@ -1,244 +1,37 @@ -/* eslint-disable @next/next/no-img-element */ 'use client' -import Footer from '@components/Footer/Footer' -import Link from 'next/link' -import { useForm, SubmitHandler } from 'react-hook-form' -import { useState } from 'react' -import { AiOutlineEye } from 'react-icons/ai' -import { AiOutlineEyeInvisible } from 'react-icons/ai' -import { RegisterForm } from '@/models/auth' -import { useHandleRegister } from '@/services/auth' -import { ButtonPrimary } from '@/components/Buttons/PrimaryButton' +import FormContainer from '@/components/organism/Register/formContainer/FormContainer' +import RegisterSIdebar from '@/components/organism/Register/sidebar/RegisterSIdebar' +import React, { useEffect, useState } from 'react' +import Loading from './loading' -const SignUp = () => { - const [showPassword, setShowPassword] = useState(false) - const [showConfirmPassword, setShowConfirmPassword] = useState(false) - const [acceptTnC, setAcceptTnC] = useState(false) - const { mutate: mutateRegister } = useHandleRegister() - const { - register: registerSignup, - handleSubmit: handleSubmitSignup, - formState: { errors: signupErrors }, - watch, - } = useForm() +const Register = () => { + const [step, setStep] = useState(0) + const [subStep, setSubStep] = useState(0) + const [loading, setLoading] = useState(true) - // Get the current values of password and confirmPassword - const password = watch('password') - - const onSignupSubmit: SubmitHandler = (data) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { confirmPassword, tnc, ...signupData } = data - mutateRegister(signupData) - } + useEffect(() => { + if (typeof window !== 'undefined') { + const registerData = localStorage.getItem('registerData') ? JSON.parse(localStorage.getItem('registerData') || '') : null + if (registerData) { + setStep(registerData.step || 0) + setSubStep(registerData.subStep || 0) + } + setLoading(false) + } + }, []) return ( -
-
-
-
- uniBuzz Logo -
-

Sign Up

-

Start your journey with us by creating an account!

-
- - - {signupErrors.firstName && Please enter your first name!} - - - {signupErrors.lastName && Please enter your last name!} - - - {signupErrors.email && ( - {signupErrors.email.message ? signupErrors.email.message : 'Please enter your email!'} - )} - - {/* TODO: make it a dropdown */} - - {signupErrors.gender && Please enter your Gender!} - - - {signupErrors.dob && Please enter your birth date!} - - - {signupErrors.country && Please enter your Country!} - - - {signupErrors.city && Please enter your City!} - -
- -
- {showPassword ? ( - setShowPassword(!showPassword)} /> - ) : ( - setShowPassword(!showPassword)} /> - )} -
-
- {signupErrors.password && ( -
- - {signupErrors.password.message ? signupErrors.password.message : 'Please enter your password!'} - -
- )} - -
- value === password || 'Passwords do not match', - })} - placeholder="Password" - className=" border pl-3 py-2 text-md rounded-lg border-gray-light font-normal w-full" - type={showConfirmPassword ? 'text' : 'password'} - /> -
- {showConfirmPassword ? ( - setShowConfirmPassword(!showConfirmPassword)} - /> - ) : ( - setShowConfirmPassword(!showConfirmPassword)} /> - )} -
-
- {signupErrors.confirmPassword && {signupErrors.confirmPassword.message}} - - -
-

- Welcome to UniBuzz, a [brief description of your product/service]. These Terms and Conditions ("Terms") govern your access - to and use of UniBuzz Network Pvt Ltd (hereon referred to as UniBuzz Networks) website, mobile application, and related services - (collectively, the "Service"). By accessing or using the Service, you agree to be bound by these Terms, our Privacy Policy, - and any additional terms applicable to certain features of the Service, which are incorporated herein by reference. By creating an - account, accessing, or Lorem ipsum dolor sit amet consectetur adipisicing elit. Vel modi et porro quo aut fugiat reprehenderit quod, - voluptate consequatur, voluptatum repellat quidem. Voluptatem, corporis mollitia laborum ab cumque quaerat soluta! Lorem ipsum dolor - sit amet, consectetur adipisicing elit. Porro, maxime sint inventore laudantium quos non libero unde. Modi, necessitatibus. Debitis - quisquam reprehenderit velit necessitatibus, maxime doloremque molestiae numquam accusamus ducimus. -

-
- -
-

- Welcome to UniBuzz, a [brief description of your product/service]. These Terms and Conditions ("Terms") govern your access - to and use of UniBuzz Network Pvt Ltd (hereon referred to as UniBuzz Networks) website, mobile application, and related services - (collectively, the "Service"). By accessing or using the Service, you agree to be bound by these Terms, our Privacy Policy, - and any additional terms applicable to certain features of the Service, which are incorporated herein by reference. By creating an - account, accessing, or Lorem ipsum dolor sit amet consectetur adipisicing elit. Neque, et, dolorem eaque, id enim laboriosam - architecto accusamus odit velit dolorum aut? Adipisci vel nisi libero! Beatae earum a illum modi?Lorem ipsum dolor sit amet - consectetur, adipisicing elit. Ea incidunt distinctio officia architecto. Officiis iure quia repudiandae culpa veniam non nemo - consequatur ut? Obcaecati, nisi. Soluta, maxime eligendi! Soluta, enim. -

-
- {/* checkbox for remember me */} -
-
- setAcceptTnC(!acceptTnC)} - className="mr-2" - /> -
- -
- {signupErrors.tnc && Required!} - {/**/} - Signd Up -

- Already a member?{' '} - - Sign In - -

-
-
-
-
-
+
+ {loading ? ( + + ) : ( + <> + + + + )} +
) } -export default SignUp +export default Register diff --git a/src/app/v2/login/page.tsx b/src/app/v2/login/page.tsx deleted file mode 100644 index 502e85c9..00000000 --- a/src/app/v2/login/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import LoginBox from '@/components/organism/Login/LoginBox' -import React from 'react' - -const Login = () => { - return ( -
- -
- ) -} - -export default Login diff --git a/src/app/v2/register/page.tsx b/src/app/v2/register/page.tsx deleted file mode 100644 index 3e744ccb..00000000 --- a/src/app/v2/register/page.tsx +++ /dev/null @@ -1,37 +0,0 @@ -'use client' -import FormContainer from '@/components/organism/Register/formContainer/FormContainer' -import RegisterSIdebar from '@/components/organism/Register/sidebar/RegisterSIdebar' -import React, { useEffect, useState } from 'react' -import Loading from './loading' - -const Register = () => { - const [step, setStep] = useState(0) - const [subStep, setSubStep] = useState(0) - const [loading, setLoading] = useState(true) - - useEffect(() => { - if (typeof window !== 'undefined') { - const registerData = localStorage.getItem('registerData') ? JSON.parse(localStorage.getItem('registerData') || '') : null - - if (registerData) { - setStep(registerData.step || 0) - setSubStep(registerData.subStep || 0) - } - setLoading(false) - } - }, []) - return ( -
- {loading ? ( - - ) : ( - <> - - - - )} -
- ) -} - -export default Register diff --git a/src/app/v2/timeline/page.tsx b/src/app/v2/timeline/page.tsx deleted file mode 100644 index 471fcc98..00000000 --- a/src/app/v2/timeline/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import LeftNavWrapper from '@/components/molecules/LeftNavWrapper' -import UniversityCard from '@/components/molecules/UniversityCard' -import LeftNavbar from '@/components/organisms/LeftNavbar' -import PostContainer from '@/components/organisms/PostsContainer' -import UserPostContainer from '@/components/organisms/UserPostContainer' -import { PostInputType } from '@/types/constants' -import React from 'react' - -export default function Timeline() { - return ( - - - - - ) -} diff --git a/src/assets/landing-mobile.svg b/src/assets/landing-mobile.svg new file mode 100644 index 00000000..6886722a --- /dev/null +++ b/src/assets/landing-mobile.svg @@ -0,0 +1,1281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/lightningIcon.svg b/src/assets/lightningIcon.svg new file mode 100644 index 00000000..464fc805 --- /dev/null +++ b/src/assets/lightningIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/section-3.svg b/src/assets/section-3.svg new file mode 100644 index 00000000..8123fedf --- /dev/null +++ b/src/assets/section-3.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/assets/section-4.svg b/src/assets/section-4.svg new file mode 100644 index 00000000..a5e4ee79 --- /dev/null +++ b/src/assets/section-4.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/section-5.svg b/src/assets/section-5.svg new file mode 100644 index 00000000..7b4ad8cd --- /dev/null +++ b/src/assets/section-5.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/components/atoms/LoginButtons/index.tsx b/src/components/atoms/LoginButtons/index.tsx index 14d73248..b47574cc 100644 --- a/src/components/atoms/LoginButtons/index.tsx +++ b/src/components/atoms/LoginButtons/index.tsx @@ -9,7 +9,7 @@ const LoginButtons: React.FC = ({ className = '', variant = 'p const variantClasses = { primary: 'bg-primary-500 text-white', secondary: 'bg-gray-500 text-white', - border: 'border border-neutral-200 text-neutral-800 ', + border: 'border border-neutral-200 text-neutral-800 shadow-button', border_primary: 'border border-primary text-primary ', danger: 'bg-red-500 text-white', shade: 'bg-secondary border border-shade-button-border text-primary-500 drop-shadow-sm', diff --git a/src/components/atoms/LogoNavbar/index.tsx b/src/components/atoms/LogoNavbar/index.tsx index 7672c924..0c6c1d69 100644 --- a/src/components/atoms/LogoNavbar/index.tsx +++ b/src/components/atoms/LogoNavbar/index.tsx @@ -1,46 +1,161 @@ +'use client' import Link from 'next/link' import Image from 'next/image' -import React from 'react' +import React, { useCallback, useEffect, useMemo, useState } from 'react' import unibuzzLogo from '@assets/unibuzz_logo.svg' import sparkles from '@assets/sparkles.svg' import { MENU_LIST } from './constant' +import LoginButton from '../LoginButton' +import LoginButtons from '../LoginButtons' +import { usePathname } from 'next/navigation' +import { useUniStore } from '@/store/store' +import avatar from '@assets/avatar.svg' +import { Skeleton } from '@/components/ui/Skeleton' +import { FaAngleDown, FaBell, FaRegUser } from 'react-icons/fa' +import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/Popover' +import { TiMessages } from 'react-icons/ti' +import { BiSolidMessageSquareDetail } from 'react-icons/bi' +import { MdInfoOutline, MdOutlineLock, MdOutlineSettings } from 'react-icons/md' +import { PiChatsBold, PiChatTextBold, PiPaintBrushDuotone } from 'react-icons/pi' +import { HiCubeTransparent } from 'react-icons/hi' +import { TbLogout } from 'react-icons/tb' interface Props { showOnlyLogo?: boolean } +const nonPaddingUrls = ['/', '/login', '/register'] + export default function LogoNavbar({ showOnlyLogo = false }: Props) { + const pathname = usePathname() + const shouldPadding = nonPaddingUrls.includes(pathname) + // const [cookieValue] = useCookie('uni_user_token') + const { userProfileData } = useUniStore() + const [isLogin, setIsLogin] = useState(undefined) + + const isUserLoggedIn = useCallback(() => { + setIsLogin(!!userProfileData.users_id) + }, [userProfileData]) + useEffect(() => { + isUserLoggedIn() + }, [userProfileData]) + + const renderProfile = () => { + switch (isLogin) { + case true: + return ( +
+ + + + +
+ profile.png + +
+
+ +
+
    +
  • + +

    Profile

    +
  • +
  • + +

    Settings

    +
  • +
  • + +

    Privacy

    +
  • + +
  • + +

    Preferences

    +
  • +
  • + +

    Upgrades

    +
  • +
+
    +
  • + +

    Help Center

    +
  • +
  • + +

    Feedback

    +
  • +
+
    +
  • + +

    Logout

    +
  • +
+
+
+
+
+ ) + case false: + return ( +
+ + Sign Up + + Login +
+ ) + default: + return + } + } + return ( -
-
- - BACPAC LOGO - -
- {!showOnlyLogo && ( -
-
- {MENU_LIST.map((menu, index) => { - if (menu.name === 'UPGRADE') { +
+
+
+ + BACPAC LOGO + +
+ {!showOnlyLogo && ( +
+
+ {MENU_LIST.map((menu, index) => { + if (menu.name === 'UPGRADE') { + return ( +
+ + {menu.name} + + upgrade_icon +
+ ) + } return ( -
- - {menu.name} - - upgrade_icon -
+ + {menu.name} + ) - } - return ( - - {menu.name} - - ) - })} + })} +
+
{renderProfile()}
- {/*Login*/} -
- )} + )} +
) } diff --git a/src/components/communityUniversity/CreateNewGroup.tsx b/src/components/communityUniversity/CreateNewGroup.tsx index 73eb745a..c6c65160 100644 --- a/src/components/communityUniversity/CreateNewGroup.tsx +++ b/src/components/communityUniversity/CreateNewGroup.tsx @@ -66,7 +66,6 @@ const CreateNewGroup = ({ setNewGroup }: Props) => { } const { data } = useGetCommunityUsers(id, userPopUp, values.communityGroupType, searchInput) - console.log('com', data) return ( <> diff --git a/src/components/communityUniversity/GroupSelectors.tsx b/src/components/communityUniversity/GroupSelectors.tsx index 43ad29e1..29188845 100644 --- a/src/components/communityUniversity/GroupSelectors.tsx +++ b/src/components/communityUniversity/GroupSelectors.tsx @@ -1,22 +1,27 @@ +import { useRouter } from 'next/navigation' import React from 'react' import { FaStar } from 'react-icons/fa' -const GroupSelectors = ({ setCurrSelectedGroup, currSelectedGroup, data }: any) => { +const GroupSelectors = ({ setCurrSelectedGroup, currSelectedGroup, communityGroup }: any) => { + const router = useRouter() + const handleSelectCommunityGroup = (id: string) => { + router.push(`/communityGroup/${id}`) + } return (
setCurrSelectedGroup(data)} + onClick={() => handleSelectCommunityGroup(communityGroup._id)} className={`${ - currSelectedGroup?.title == data?.title + currSelectedGroup?.title == communityGroup?.title ? 'bg-[#F3F2FF] max-md:bg-white max-md:after:h-[4px] after:rounded-full' : 'border-t-2 max-md:border-0 border-neutral-300' - } flex w-full gap-2 items-center gap-1 py-2 px-3 first-of-type:border-0 relative after:content-[''] after:absolute after:left-3 after:z-30 after:top-[calc(90%+10px)] after:w-[calc(60%)] after:bg-[#6647FF] `} + } flex w-full gap-2 items-center py-2 px-3 first-of-type:border-0 relative after:content-[''] after:absolute after:left-3 after:z-30 after:top-[calc(90%+10px)] after:w-[calc(60%)] after:bg-[#6647FF] `} > - {data?.communityGroupLogoUrl?.imageUrl ? ( - dp + {communityGroup?.communityGroupLogoUrl?.imageUrl ? ( + dp ) : (
)} - + {/* */}
) diff --git a/src/components/messages/UserMessageContainer.tsx b/src/components/messages/UserMessageContainer.tsx index d853e04e..26effc2d 100644 --- a/src/components/messages/UserMessageContainer.tsx +++ b/src/components/messages/UserMessageContainer.tsx @@ -143,7 +143,7 @@ const UserMessageContainer = ({ name, profileCover, chatId, users, isRequest, is
{/* // input box */} {isRequest ? ( - + ) : (

Accept request to message

diff --git a/src/components/molecules/NavbarUniversityItem/index.tsx b/src/components/molecules/NavbarUniversityItem/index.tsx index a8ffc751..636cae99 100644 --- a/src/components/molecules/NavbarUniversityItem/index.tsx +++ b/src/components/molecules/NavbarUniversityItem/index.tsx @@ -1,18 +1,53 @@ +import GroupSearchBox from '@/components/atoms/GroupSearchBox' +import GroupSelectors from '@/components/communityUniversity/GroupSelectors' import UserListItemSkeleton from '@/components/Connections/UserListItemSkeleton' +import { useGetCommunityGroups } from '@/services/community-university' import { useGetUserSubscribedCommunityGroups } from '@/services/university-community' import Image from 'next/image' -import { useRouter } from 'next/navigation' -import React, { useState } from 'react' +import { useParams, useRouter } from 'next/navigation' +import React, { useEffect, useState } from 'react' +import { FiFilter } from 'react-icons/fi' +import { PiFilesFill } from 'react-icons/pi' +import Tabs from '../Tabs' export default function NavbarUniversityItem() { const { data: SubscribedData, isFetching, isLoading } = useGetUserSubscribedCommunityGroups() - const [selectUniversity, setSelectUniversity] = useState(-1) + const [currSelectedGroup, setCurrSelectedGroup] = useState(null) const router = useRouter() + const { id }: any = useParams() + + const { data: communityGroups } = useGetCommunityGroups(id, true) + + const tabData = [ + { + label: 'All', + content: ( + <> + {communityGroups && + communityGroups?.groups.map((communityGroup: any) => ( + + ))} + + ), + }, + { + label: 'Joined', + content:
This is the content of Tab 2.
, + }, + { + label: 'Your Group', + content:
This is the content of Tab 3.
, + }, + ] const handleUniversityClick = (index: React.SetStateAction) => { - setSelectUniversity(index) const indextoPush = Number(index) - router.push(`/v2/community/${SubscribedData?.community[indextoPush]._id}`) + router.push(`/community/${SubscribedData?.community[indextoPush]._id}`) } if (isFetching || isLoading) return @@ -26,7 +61,7 @@ export default function NavbarUniversityItem() {
handleUniversityClick(index)} - className={`${index === selectUniversity && 'bg-[#F3F2FF]'} flex items-center gap-3 py-2 px-4 cursor-pointer`} + className={`${id === community._id && 'bg-[#F3F2FF]'} flex items-center gap-3 py-2 px-4 cursor-pointer`} > {community.name} -

{community.name}

+

{community.name}

) })} +

UNIVERSITY GROUPS

+
+
+
+ +
+ +
+
+
+
+
+

Filter

+ +
+
+
+
+

Filter

+ +
+
+
+ ) } diff --git a/src/components/molecules/SubscribedUniversity/index.tsx b/src/components/molecules/SubscribedUniversity/index.tsx index 6dcc811d..761f2ab2 100644 --- a/src/components/molecules/SubscribedUniversity/index.tsx +++ b/src/components/molecules/SubscribedUniversity/index.tsx @@ -1,4 +1,4 @@ -import Loading from '@/app/community/loading' +import Loading from '@/app/old-community/loading' import { useGetUserSubscribedCommunityGroups } from '@/services/university-community' import React from 'react' diff --git a/src/components/molecules/Tabs/index.tsx b/src/components/molecules/Tabs/index.tsx index cba0637b..6b3c1310 100644 --- a/src/components/molecules/Tabs/index.tsx +++ b/src/components/molecules/Tabs/index.tsx @@ -17,7 +17,7 @@ const Tabs: React.FC = ({ tabs }) => { } return ( -
+
{/* Tabs List */}
{tabs.map((tab, index) => ( @@ -35,7 +35,7 @@ const Tabs: React.FC = ({ tabs }) => { {/* Tabs Content */} -
{tabs[activeTab].content}
+
{tabs[activeTab].content}
) } diff --git a/src/components/organisms/LeftNavbar/index.tsx b/src/components/organisms/LeftNavbar/index.tsx index 68fc676f..52a218ae 100644 --- a/src/components/organisms/LeftNavbar/index.tsx +++ b/src/components/organisms/LeftNavbar/index.tsx @@ -1,37 +1,24 @@ 'use client' import Card from '@/components/atoms/Card' -import React, { useEffect, useState } from 'react' +import React, { useState } from 'react' import avatar from '@assets/avatar.svg' import SubText from '@/components/atoms/SubText' import { HiHome } from 'react-icons/hi' import { IoMdPeople } from 'react-icons/io' import { BiSolidMessageDots } from 'react-icons/bi' import { FaBell } from 'react-icons/fa6' -import { PiFilesFill, PiFinnTheHumanFill } from 'react-icons/pi' -import GroupSearchBox from '@/components/atoms/GroupSearchBox' +import { PiFinnTheHumanFill } from 'react-icons/pi' import NavbarUniversityItem from '@/components/molecules/NavbarUniversityItem' -import { FiFilter } from 'react-icons/fi' -import Tabs from '@/components/molecules/Tabs' -import { useGetCommunityGroups } from '@/services/community-university' -import { useParams, usePathname, useRouter } from 'next/navigation' -import GroupSelectors from '@/components/communityUniversity/GroupSelectors' +import { usePathname, useRouter } from 'next/navigation' import { useUniStore } from '@/store/store' import Image from 'next/image' import UserListItemSkeleton from '@/components/Connections/UserListItemSkeleton' export default function LeftNavbar() { - const [currSelectedGroup, setCurrSelectedGroup] = useState(null) - - const { id }: any = useParams() const pathname = usePathname() const router = useRouter() const { userData, userProfileData } = useUniStore() - const { data: communityGroups } = useGetCommunityGroups(id, true) - useEffect(() => { - setCurrSelectedGroup(communityGroups?.groups[0]) - }, [communityGroups]) - const menuItems = [ { name: 'Home', icon: , path: '/timeline' }, { name: 'Connections', icon: , path: '/connections' }, @@ -47,27 +34,6 @@ export default function LeftNavbar() { router.push(item.path) } - const tabData = [ - { - label: 'All', - content: ( -
- {communityGroups?.groups.map((item: any) => ( - - ))} -
- ), - }, - { - label: 'Joined', - content:
This is the content of Tab 2.
, - }, - { - label: 'Your Group', - content:
This is the content of Tab 3.
, - }, - ] - console.log(userProfileData.cover_dp) const renderProfile = () => { if (userProfileData.cover_dp?.imageUrl) { return ( @@ -84,8 +50,8 @@ export default function LeftNavbar() { return } return ( -
- +
+
{renderProfile()}
@@ -113,40 +79,6 @@ export default function LeftNavbar() {

UNIVERSITIES

- -

UNIVERSITY GROUPS

-
-
-
- -
- -
-
-
-
-
-

Filter

- -
-
-
-
-

Filter

- -
-
-
-
) diff --git a/src/components/organisms/PostsContainer/index.tsx b/src/components/organisms/PostsContainer/index.tsx index 5364aa63..5cb5cc82 100644 --- a/src/components/organisms/PostsContainer/index.tsx +++ b/src/components/organisms/PostsContainer/index.tsx @@ -1,5 +1,5 @@ 'use client' -import Loading from '@/app/v2/register/loading' +import Loading from '@/app/register/loading' import PostImageSlider from '@/components/atoms/PostImageSlider' import PostCard from '@/components/molecules/PostCard' import PostContainerPostTypeSelector from '@/components/molecules/PostContainerPostTypeSelector' @@ -30,18 +30,18 @@ interface communityPostType { imageUrl: [] } -const PostContainer = ({ currSelectedGroup }: any) => { - const pathname = usePathname() - +const PostContainer = ({ isTimeline = false, communityId }: any) => { const { userData } = useUniStore() - const { isLoading, data: TimelinePosts, error, isFetching } = useGetTimelinePosts(pathname == '/timeline') + console.log(isTimeline, 'isTimelineisTimelineisTimeline') + const { isLoading, data: TimelinePosts, error, isFetching } = useGetTimelinePosts(isTimeline) const timelinePosts = TimelinePosts?.timelinePosts const [isJoinedInGroup, setIsJoinedInGroup] = useState(false) const { data: communityGroupPost, isFetching: communityGroupPostLoading, isError, - } = useGetCommunityGroupPost(currSelectedGroup?._id, isJoinedInGroup, pathname == '/community') + } = useGetCommunityGroupPost('668648f21cf42b7942f3ece6', isJoinedInGroup, !!communityId) + const [imageCarasol, setImageCarasol] = useState<{ isShow: boolean images: any @@ -61,58 +61,60 @@ const PostContainer = ({ currSelectedGroup }: any) => { }, [userData]) useEffect(() => { - if (pathname) { - const communityGroupId = currSelectedGroup?._id?.toString() + if (communityId) { + const communityGroupId = communityId.toString() if (userVerifiedCommunityGroupIds.includes(communityGroupId) || userUnverifiedVerifiedCommunityGroupIds.includes(communityGroupId)) { setIsJoinedInGroup(true) } else { setIsJoinedInGroup(false) } } - }, [currSelectedGroup, userVerifiedCommunityGroupIds, userUnverifiedVerifiedCommunityGroupIds]) + }, [communityId, userVerifiedCommunityGroupIds, userUnverifiedVerifiedCommunityGroupIds]) const renderPostWithRespectToPathName = () => { - switch (pathname) { - case '/timeline': - return timelinePosts?.map((post: communityPostType, idx: number) => ( - - )) - case '/community': - return communityGroupPost?.communityPosts?.map((post: communityPostType, idx: number) => ( - - )) - default: - return
No valid path selected
+ if (isTimeline) { + return ( + <> + {timelinePosts?.map((post: communityPostType, idx: number) => ( + + ))} + + ) + } + if (communityId) { + return communityGroupPost?.communityPosts?.map((post: communityPostType, idx: number) => ( + + )) } } diff --git a/src/services/community-university.ts b/src/services/community-university.ts index d7da1378..07362e54 100644 --- a/src/services/community-university.ts +++ b/src/services/community-university.ts @@ -231,7 +231,7 @@ export function useGetCommunityGroupPost(communityId: string, isJoined: boolean, const state = useQuery({ queryKey: ['communityGroupsPost', communityId], queryFn: () => getAllCommunityGroupPost(communityId, cookieValue), - enabled: isJoined && isCommunity, + enabled: isJoined && isCommunity && !!cookieValue, }) let errorMessage = null diff --git a/src/store/userProfileSlice/userProfileSlice.ts b/src/store/userProfileSlice/userProfileSlice.ts index eb8afc2c..c5632b71 100644 --- a/src/store/userProfileSlice/userProfileSlice.ts +++ b/src/store/userProfileSlice/userProfileSlice.ts @@ -15,7 +15,7 @@ type userProfileAction = { const initialState: userProfileState = { userProfileData: { _id: '', - users_id: '', + users_id: null, profile_dp: { imageUrl: '', publicId: '' }, email: [{ UniversityName: '', UniversityEmail: '' }], cover_dp: { imageUrl: '', publicId: '' }, diff --git a/src/store/userProfileSlice/userProfileType.ts b/src/store/userProfileSlice/userProfileType.ts index d6f77399..07c237b9 100644 --- a/src/store/userProfileSlice/userProfileType.ts +++ b/src/store/userProfileSlice/userProfileType.ts @@ -8,7 +8,7 @@ interface following { } export interface userProfileType { - users_id: string + users_id: string | null profile_dp?: { imageUrl: string; publicId: string } email: emailType[] cover_dp?: { imageUrl: string; publicId: string } diff --git a/tailwind.config.js b/tailwind.config.js index b777b0ee..a99d6d3f 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -18,7 +18,7 @@ module.exports = { 'sm': '16px', 'md': '24px', 'lg': '36px', - 'xl': '42px' + 'xl': '40px' }, backgroundImage: { 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', @@ -36,6 +36,7 @@ module.exports = { colors: { 'primary': '#6647FF', 'primary-500': '#6744FF', + 'primary-700': '#3A169C', 'secondary': '#F3F2FF', 'neutral-200': '#E5E7EB', 'neutral-500': '#6B7280', @@ -52,10 +53,20 @@ module.exports = { 'warning-500': '#F59E0B' }, boxShadow: { - 'card': '0px 6px 15px -2px rgba(16, 24, 40, 0.08)' + 'card': '0px 6px 15px -2px rgba(16, 24, 40, 0.08)', + 'button': '0px 1px 2px 0px rgba(16, 24, 40, 0.04), 0px 1px 2px 0px rgba(16, 24, 40, 0.04);', + 'popper': '0px 8px 24px -3px rgba(16, 24, 40, 0.05), 0px 8px 24px -3px rgba(16, 24, 40, 0.10);' } }, }, - plugins: [], + plugins: [ + function ({addUtilities}) { + addUtilities({ + '.h-with-navbar': { + height: 'calc(100vh - 4rem)', // Replace 4rem with your actual navbar height + }, + }); + }, + ], } From efcdaa8711a07d5588d1c6f91cb91a44fa2f7daa Mon Sep 17 00:00:00 2001 From: bacpactech Date: Tue, 1 Oct 2024 16:18:19 +0530 Subject: [PATCH 2/2] fix left navbar --- src/app/(withLayout)/layout.tsx | 2 +- src/components/organisms/LeftNavbar/index.tsx | 2 +- tailwind.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/(withLayout)/layout.tsx b/src/app/(withLayout)/layout.tsx index 48a73a88..eecf5b01 100644 --- a/src/app/(withLayout)/layout.tsx +++ b/src/app/(withLayout)/layout.tsx @@ -5,7 +5,7 @@ export default function Layout({ children }: { children: React.ReactNode }) { return (
-
+
diff --git a/src/components/organisms/LeftNavbar/index.tsx b/src/components/organisms/LeftNavbar/index.tsx index 52a218ae..7b59cc0c 100644 --- a/src/components/organisms/LeftNavbar/index.tsx +++ b/src/components/organisms/LeftNavbar/index.tsx @@ -51,7 +51,7 @@ export default function LeftNavbar() { } return (
- +
{renderProfile()}
diff --git a/tailwind.config.js b/tailwind.config.js index a99d6d3f..6efcd61c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -64,7 +64,7 @@ module.exports = { function ({addUtilities}) { addUtilities({ '.h-with-navbar': { - height: 'calc(100vh - 4rem)', // Replace 4rem with your actual navbar height + height: 'calc(100vh - 68px)', }, }); },