|
| 1 | +/* eslint-disable react/jsx-no-undef */ |
1 | 2 | import { useEffect, useRef, useState } from 'react' |
2 | 3 | import { Joystick } from 'react-joystick-component' |
3 | 4 | import { Game } from '@/game/Game' |
4 | 5 | import Link from 'next/link' |
5 | 6 | import { SerializedMessageType } from '@shared/network/server/serialized' |
6 | 7 | import { MessageComponent } from '@shared/component/MessageComponent' |
7 | | -import { Twitter, Github, Maximize } from 'lucide-react' |
| 8 | +import { Maximize } from 'lucide-react' |
| 9 | +import { MicroGameCard } from './GameCard' |
| 10 | +import { GameInfo } from '@/types' |
| 11 | +import gameData from '../public/gameData.json' |
8 | 12 |
|
9 | 13 | export interface GameHudProps { |
10 | 14 | messages: MessageComponent[] |
@@ -170,7 +174,19 @@ export default function GameHud({ |
170 | 174 | </div> |
171 | 175 | </div> |
172 | 176 |
|
173 | | - <div className="absolute bottom-4 right-4 bg-black bg-opacity-20 rounded-xl p-4 z-50 hidden lg:flex flex-col w-[360px] pointer-events-auto space-y-4"> |
| 177 | + <div className="absolute bottom-4 right-4 bg-black bg-opacity-20 rounded-xl p-4 z-50 hidden lg:flex flex-col w-[360px] pointer-events-auto space-y-2"> |
| 178 | + {/* Other games cards mini section */} |
| 179 | + <div className="grid grid-cols-4 gap-3"> |
| 180 | + {gameData.slice(0, 4).map((game: GameInfo) => ( |
| 181 | + <MicroGameCard |
| 182 | + key={game.slug} |
| 183 | + title={game.title} |
| 184 | + imageUrl={game.imageUrl} |
| 185 | + slug={game.slug} |
| 186 | + /> |
| 187 | + ))} |
| 188 | + </div> |
| 189 | + |
174 | 190 | <div className="overflow-y-auto max-h-64 h-64 space-y-2 pr-2"> |
175 | 191 | {getFilteredMessages().map((messageComponent, index) => { |
176 | 192 | return ( |
|
0 commit comments