refactor(components): use arrow function syntax and improve consistency

This commit is contained in:
Ralex
2025-10-25 15:04:03 +02:00
parent ac486b3d7d
commit dbefaa0557
32 changed files with 351 additions and 337 deletions

View File

@@ -15,7 +15,7 @@ import { GAME_STATE_COMPONENTS } from "@rahoot/web/utils/constants"
import { useParams, useRouter } from "next/navigation"
import toast from "react-hot-toast"
export default function Game() {
const Game = () => {
const router = useRouter()
const { socket } = useSocket()
const { gameId: gameIdParam }: { gameId?: string } = useParams()
@@ -95,3 +95,5 @@ export default function Game() {
return <GameWrapper statusName={status.name}>{component}</GameWrapper>
}
export default Game

View File

@@ -17,7 +17,7 @@ import { GAME_STATE_COMPONENTS_MANAGER } from "@rahoot/web/utils/constants"
import { useParams, useRouter } from "next/navigation"
import toast from "react-hot-toast"
export default function ManagerGame() {
const ManagerGame = () => {
const router = useRouter()
const { gameId: gameIdParam }: { gameId?: string } = useParams()
const { socket } = useSocket()
@@ -131,3 +131,5 @@ export default function ManagerGame() {
</GameWrapper>
)
}
export default ManagerGame