diff --git a/containers/api/src/auth/login42.ts b/containers/api/src/auth/login42.ts index ceb2ebb0..a4aa5b53 100644 --- a/containers/api/src/auth/login42.ts +++ b/containers/api/src/auth/login42.ts @@ -74,10 +74,13 @@ export class loginClass { friends: null, blocked: null, photo: null, - sessionNumber: 1, + sessionNumber: 0, }; await this.usersService.create(user); } + // if (user.status !== 2 || user.status === 0) //super + // user.status = 1; + // user.sessionNumber++; // console.log(`in login42 user= ${user}`) const myJSON = JSON.stringify(user); console.log(`in login42 user= ${myJSON}`) diff --git a/containers/react/src/components/App.tsx b/containers/react/src/components/App.tsx index ece4ec07..ea84e6c9 100644 --- a/containers/react/src/components/App.tsx +++ b/containers/react/src/components/App.tsx @@ -27,8 +27,6 @@ function AnimatedRoute () { useEffect(() => { const handleBeforeUnload = async (event: { preventDefault: () => void; returnValue: string; }) => { - event.preventDefault(); // Cancel the default event behavior if needed - event.returnValue = ''; // Chrome requires a return value to display a custom message if (!localStorage.getItem('token')) return ; try { @@ -36,9 +34,6 @@ function AnimatedRoute () { } catch(err) { console.log(err); } - - // Perform your desired actions before the user leaves the page - // For example, you can show a confirmation dialog or save user data }; window.addEventListener('beforeunload', handleBeforeUnload); diff --git a/containers/react/src/components/Sidebar/SidebarData.tsx b/containers/react/src/components/Sidebar/SidebarData.tsx index f3812ac6..5af5b5c5 100644 --- a/containers/react/src/components/Sidebar/SidebarData.tsx +++ b/containers/react/src/components/Sidebar/SidebarData.tsx @@ -26,7 +26,7 @@ export const SidebarData = [ cName: 'nav-text' }, { - title: 'Friend', + title: 'Friends', path: '/social', icon: , cName: 'nav-text' diff --git a/containers/react/src/components/Social/Friend.tsx b/containers/react/src/components/Social/Friend.tsx index b49245fc..ae282f65 100644 --- a/containers/react/src/components/Social/Friend.tsx +++ b/containers/react/src/components/Social/Friend.tsx @@ -27,6 +27,7 @@ const UserChat = styled.div ` gap: 5px; color: white; cursor: pointer; + margin-top: 15px; &:hover{ background-color: #3e3c61; @@ -93,7 +94,7 @@ export default function Friend({currentUser}: UserProps) }; return ( - + {profilePicture ? ( ) : ( diff --git a/containers/react/src/components/Social/Social.tsx b/containers/react/src/components/Social/Social.tsx index e8d7cd17..53a2c9d4 100644 --- a/containers/react/src/components/Social/Social.tsx +++ b/containers/react/src/components/Social/Social.tsx @@ -87,14 +87,14 @@ function Social (){ return (
-
+
{/* profile */} {isLoading || !user ? (

Loading...

) : ( -

Social

+

Friends

)}
diff --git a/containers/react/src/styles/App.css b/containers/react/src/styles/App.css index dd8aca35..2104abf9 100644 --- a/containers/react/src/styles/App.css +++ b/containers/react/src/styles/App.css @@ -35,6 +35,11 @@ input.qr{ height: 40vmin; pointer-events: none; } +.centermargin +{ + margin-left: 40px; + margin-right: 40px; +} @media (prefers-reduced-motion: no-preference) { .App-logo { diff --git a/containers/react/src/styles/Messages.css b/containers/react/src/styles/Messages.css index 8d4ebf1a..90064809 100644 --- a/containers/react/src/styles/Messages.css +++ b/containers/react/src/styles/Messages.css @@ -108,6 +108,19 @@ select{ margin-top: 0px; } +.navbarSocial{ + /* width: clamp(50%, 500px, 20%); */ + /* height: min(50%, 100px); */ + display: flex; + align-items: center; + /* background-color: yellow; */ + margin: 10px; + background-image: linear-gradient(90deg, #5843e4, #5a0760); + color: white; + padding: 3px; + border-radius: 100px; +} + .pic{ height: 35px; width: 35px; @@ -173,7 +186,7 @@ input{ width: 40px; height: 40px; border-radius: 50%; - margin: 10px; + margin: 10px; } .messageContent{