Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"code": 100
"code": 120
}
],
"max-statements-per-line": "warn",
Expand Down
9 changes: 5 additions & 4 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"scripts": {
"start": "vite --host",
"dev": "vite",
"build": "vite build",
"lint": "eslint --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore --fix src",
"format": "prettier --write .",
Expand Down
4 changes: 2 additions & 2 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import NavBar from 'components/NavBar';
import NoPage from './pages/NoPage';
import Profile from './pages/Profile';
import ProtectedRoutes from 'components/ProtectedRoutes';
import ReactGA from 'react-ga4';
// import ReactGA from 'react-ga4';
import Searching from 'pages/Searching';
import Settings from 'pages/Settings';
import Start from 'pages/Start';
Expand All @@ -19,7 +19,7 @@ import MatchFound from './pages/MatchFound';
import { Toaster } from 'react-hot-toast';

function App() {
ReactGA.initialize(import.meta.env.VITE_GOOGLE_ANALYTICS);
// ReactGA.initialize(import.meta.env.VITE_GOOGLE_ANALYTICS); // Disabled to prevent GA_MEASUREMENT_ID error

const { isLoggedIn } = useAuth();
const { updateOnlineStatus, app } = useApp();
Expand Down
6 changes: 2 additions & 4 deletions client/src/components/Dialog.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import ReactDOM from 'react-dom';

import PropTypes from 'prop-types';
// import PropTypes from 'prop-types';

import { useDialog } from 'src/context/DialogContext';
import { useApp } from 'src/context/AppContext';
Expand Down Expand Up @@ -73,6 +73,4 @@ const Dialog = ({ ...rest }) => {

export default Dialog;

Dialog.propTypes = {
children: PropTypes.node.isRequired,
};
// Dialog does not use children, so no propTypes needed for children
30 changes: 15 additions & 15 deletions client/src/components/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { socket } from 'src/lib/socketConnection';
import { useApp } from 'src/context/AppContext';
import { NEW_EVENT_LOGOUT } from '../../../constants.json';

const linkStyle = `h-full w-full flex items-center justify-center hover:bg-primary rounded-[15px] md:max-h-[60px] md:h-[60px] md:min-h-[60px] `;
const activeStyle = linkStyle + 'bg-primary';
const linkStyle = `h-full w-full flex items-center justify-center transition-all duration-200 rounded-full md:max-h-[60px] md:h-[60px] md:min-h-[60px] hover:scale-110 hover:bg-gradient-to-r hover:from-blue-400 hover:to-purple-500`;
const activeStyle = `${linkStyle} bg-gradient-to-r from-blue-500 to-purple-600 shadow-lg scale-110`;

const NavBar = () => {
const { authState, dispatchAuth } = useAuth();
Expand Down Expand Up @@ -66,12 +66,12 @@ const NavBar = () => {

return (
<div
className={`${
hideNavbar && 'hidden'
} bg-secondary md:w-[120px] md:min-h-screen md:max-h-screen items-center md:flex-col flex-row justify-between shadow-[rgb(0,_0,_0)_12px_0px_18px_-18px] p-2 md:p-5 sticky bottom-0 md:flex max-h-[70px] h-[70px] min-h-[70px]`}
className={`${hideNavbar ? 'hidden' : ''} bg-gradient-to-br from-blue-100 via-purple-200 to-pink-200 md:w-[80px] md:min-h-screen md:max-h-screen items-center md:flex-col flex-row justify-between shadow-lg p-1 md:p-2 sticky bottom-0 md:flex max-h-[56px] h-[56px] min-h-[56px]`}
>
<div className="hidden md:flex">
<img src="favicon.ico" />
{/* User Avatar Section */}
<div className="flex flex-col items-center justify-center mb-2 md:mb-4">
<img src={authState?.avatarUrl || '/public/logo192.png'} alt="User Avatar" className="w-8 h-8 rounded-full border-2 border-purple-400 shadow-md" />
<span className="mt-1 text-xs font-semibold text-purple-700">{authState?.username || 'User'}</span>
</div>
<div className="justify-between md:justify-center flex items-center md:flex-col flex-row w-full h-full gap-2 flex-nowrap overflow-auto">
<Whisper
Expand All @@ -81,7 +81,7 @@ const NavBar = () => {
speaker={<Tooltip>Search for random buddies</Tooltip>}
>
<NavLink to="/" className={getLinkStyle}>
<Icon icon="fluent:people-search-20-regular" color="white" height="24" width="24" />
<Icon icon="material-symbols:search-rounded" color="#7c3aed" height="22" width="22" />
</NavLink>
</Whisper>
<Whisper
Expand All @@ -91,7 +91,7 @@ const NavBar = () => {
speaker={<Tooltip>Friends</Tooltip>}
>
<NavLink to="/friends" className={getLinkStyle}>
<Icon color="white" icon="la:user-friends" height="24" width="24" />
<Icon icon="mdi:account-group" color="#7c3aed" height="22" width="22" />
</NavLink>
</Whisper>
<Whisper
Expand All @@ -101,7 +101,7 @@ const NavBar = () => {
speaker={<Tooltip>My Profile</Tooltip>}
>
<NavLink to="/profile" className={getLinkStyle}>
<Icon icon="fluent:person-circle-20-regular" color="white" height="24" width="24" />
<Icon icon="mdi:account-circle" color="#7c3aed" height="22" width="22" />
</NavLink>
</Whisper>

Expand All @@ -114,7 +114,7 @@ const NavBar = () => {
speaker={<Tooltip>Settings</Tooltip>}
>
<NavLink to="/settings" className={getLinkStyle}>
<Icon icon="ic:outline-settings" color="white" height="24" width="24" />
<Icon icon="mdi:cog-outline" color="#7c3aed" height="22" width="22" />
</NavLink>
</Whisper>
</div>
Expand All @@ -127,7 +127,7 @@ const NavBar = () => {
speaker={<Tooltip>Logout</Tooltip>}
>
<button className={linkStyle} onClick={() => handleLogout()}>
<Icon icon="majesticons:logout-half-circle" color="white" height={24} width={24} />
<Icon icon="mdi:logout" color="#7c3aed" height={22} width={22} />
</button>
</Whisper>
</div>
Expand All @@ -140,7 +140,7 @@ const NavBar = () => {
speaker={<Tooltip>Settings</Tooltip>}
>
<NavLink to="/settings" className={getLinkStyle}>
<Icon icon="ic:outline-settings" color="white" height="24" width="24" />
<Icon icon="mdi:cog-outline" color="#7c3aed" height="22" width="22" />
</NavLink>
</Whisper>
<Whisper
Expand All @@ -150,12 +150,12 @@ const NavBar = () => {
speaker={<Tooltip>Logout</Tooltip>}
>
<button className={linkStyle} onClick={() => handleLogout()}>
<Icon icon="majesticons:logout-half-circle" color="white" height={24} width={24} />
<Icon icon="mdi:logout" color="#7c3aed" height={22} width={22} />
</button>
</Whisper>
</div>
</div>
);
};
}

export default NavBar;
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading