mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-14 04:25:35 +01:00
refactor(components): use arrow function syntax and improve consistency
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user