diff --git a/backend/djangoindia/db/admin.py b/backend/djangoindia/db/admin.py index 5f7a86e8..f3c4f059 100644 --- a/backend/djangoindia/db/admin.py +++ b/backend/djangoindia/db/admin.py @@ -299,9 +299,16 @@ class UserAdmin(admin.ModelAdmin): "first_name", "last_name", "avatar", + "cover_image", "gender", - "organization", "mobile_number", + "bio", + "about", + "website", + "linkedin", + "github", + "twitter", + "instagram", ) }, ), diff --git a/frontend/src/containers/Login/Login.tsx b/frontend/src/containers/Login/Login.tsx index ebd4b005..a1488f66 100644 --- a/frontend/src/containers/Login/Login.tsx +++ b/frontend/src/containers/Login/Login.tsx @@ -10,8 +10,7 @@ import { useRouter } from 'next/navigation'; import { signIn } from 'next-auth/react'; import { enqueueSnackbar } from 'notistack'; import { type SubmitHandler, useForm } from 'react-hook-form'; -import { AiFillGoogleCircle, AiFillGoogleSquare } from 'react-icons/ai'; -import { FaGoogle, FaHome } from 'react-icons/fa'; +import { FaHome, FaGoogle } from 'react-icons/fa'; import { Button, Input, Label } from '@/components'; import { LOGIN_FORM_SCHEMA } from '@/constants'; @@ -58,7 +57,7 @@ const Page = () => { > -
+
{
{ Enter your details to continue
@@ -146,19 +145,19 @@ const Page = () => {
{
{
{ Become a member
@@ -137,11 +138,25 @@ const SignupForm = () => {
+
+ Or + +
-
+
{
- + diff --git a/frontend/src/containers/Users/User.tsx b/frontend/src/containers/Users/User.tsx index d32304cd..f0792b8b 100644 --- a/frontend/src/containers/Users/User.tsx +++ b/frontend/src/containers/Users/User.tsx @@ -22,7 +22,14 @@ type UserData = { username: string; is_password_autoset: boolean; gender: string; - organization: string | null; + bio: string | null; + about: string | null; + website: string | null; + linkedin: string | null; + github: string | null; + twitter: string | null; + instagram: string | null; + cover_image: string | null; }; const UserContainer = async ({ @@ -36,25 +43,23 @@ const UserContainer = async ({ }, }); - console.log(userData); - return (
Profile Cover - +
-

{userData?.username}

+

{userData?.first_name}{' '}{userData?.last_name}

+

@{userData?.username}

{/* Uncomment when API cahnges are done */} - {/* Senior Frontend Developer @JTG - Gurugram, India */} + {userData?.bio}
); diff --git a/frontend/src/sections/Navbar/Navbar.tsx b/frontend/src/sections/Navbar/Navbar.tsx index 5273d7e6..b3177287 100644 --- a/frontend/src/sections/Navbar/Navbar.tsx +++ b/frontend/src/sections/Navbar/Navbar.tsx @@ -26,72 +26,121 @@ const Drawer = ({ isOpen, onClose, pathname, + status, + router, + session, }: { isOpen: boolean; onClose: () => void; pathname: string; + status: string; + router: any; + session: any; }) => { return (
-
- - - Home - - - Events - - - Gallery - - - Sponsors and partners - - - Contact Us - -
- +
+ + + +
+ {status === 'authenticated' ? ( + + + router.push('/users/me')}> + My Profile + + + signOut({ callbackUrl: '/home' })} + > + Log out + + + +
+
+ + + {session?.user?.name?.charAt(0) || 'DU'} + +
+

+ {session?.user?.name || session?.user?.email?.split('@')[0]} +

+

{session?.user?.email}

+
+
+ +
+
+
+ ) : ( + + )} +
- logo -
); }; + const HamburgerMenuIcon = () => ( ( ); const Navbar = () => { - const { status } = useSession(); + const { data: session, status } = useSession(); const pathname = usePathname(); //current pathname const width = useWidth(); @@ -225,30 +274,30 @@ const Navbar = () => { {status === 'authenticated' ? ( - - - - DU - - - - router.push('/users/me')} - > - My Profile - - - - signOut({ - callbackUrl: '/home', - }) - } - > - Log out - - - + + + + DU + + + + router.push('/users/me')} + > + My Profile + + + + signOut({ + callbackUrl: '/home', + }) + } + > + Log out + + + ) : (