Skip to content

Commit

Permalink
Merge pull request #108 from B-ki/someFix
Browse files Browse the repository at this point in the history
little fixes
  • Loading branch information
Bilaboz authored Nov 27, 2023
2 parents 5953f6e + 0b025a9 commit 31d1501
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions front/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { Button } from './Button';
const navigation = [
{ id: '0', name: 'Game', href: '/game' },
{ id: '1', name: 'Profile', href: '/profile' },
{ id: '2', name: 'Friends', href: '/friends' },
{ id: '3', name: '2FA', href: '/2fa' },
{ id: '2', name: 'Chat', href: '/chat' },
{ id: '3', name: 'Friends', href: '/friends' },
{ id: '4', name: '2FA', href: '/2fa' },
];

export const Dropdown = () => {
Expand Down
12 changes: 10 additions & 2 deletions front/src/components/FriendList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,18 @@ const FriendList = () => {
placeholder="Search a friend"
ref={nameRef}
></input>
<button className="rounded-full p-1 hover:bg-dark-3" onClick={addFriend}>
<button
className="rounded-full p-1 hover:bg-white-3"
title="Add friend"
onClick={addFriend}
>
<img className="w-5 md:w-6" src={chat_add} alt="add friend" />
</button>
<button className="rounded-full p-1 hover:bg-dark-3" onClick={removeFriend}>
<button
className="rounded-full p-1 hover:bg-white-3"
title="Remove friend"
onClick={removeFriend}
>
<img className="w-5 md:w-6" src={close_icon} alt="remove friend" />
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion front/src/components/GameHistoryTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const GameHistoryTable: FC<HistoryProps> = ({ login }) => {
data: games,
isLoading,
isError,
} = useApi().get('get games', `game/all/${login}`) as UseQueryResult<gameDto[]>;
} = useApi().get(`get games of ${login}`, `game/all/${login}`) as UseQueryResult<gameDto[]>;

if (isLoading) {
return <div>Loading...</div>;
Expand Down
6 changes: 3 additions & 3 deletions front/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Navbar = () => {
Our Pong
</span>
</button>
<div className="hidden space-x-4 sm:flex sm:items-center sm:justify-center">
<div className="hidden space-x-4 sm:items-center sm:justify-center md:flex">
{navigation.map((item) => (
<NavLink
key={item.name}
Expand All @@ -56,12 +56,12 @@ export const Navbar = () => {
))}
</div>
</div>
<div className="hidden items-center justify-end sm:flex ">
<div className="hidden items-center justify-end md:flex ">
<Button size="small" type="primary" onClick={() => handleLogoutClick()}>
logout
</Button>
</div>
<div className="flex sm:hidden">
<div className="flex md:hidden">
<Dropdown />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion front/src/pages/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class Pong extends Component {
}

componentWillUnmount(): void {
this.app.destroy(true, { children: false, texture: true, baseTexture: true });
this.app.destroy(true, { children: true, texture: true, baseTexture: true });
this.socket.disconnect();
window.onresize = () => {};
}
Expand Down
4 changes: 0 additions & 4 deletions front/src/pages/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import { useApi } from '@/hooks/useApi';

function User() {
const routeParams = useParams();
const [username, setUsername] = useState('');
const [description, setDescription] = useState('');
const [File, setFile] = useState<File | null>(null);
const [banner, setBanner] = useState<File | null>(null);

const { data: games } = useApi().get(
'get user win',
Expand Down

0 comments on commit 31d1501

Please sign in to comment.