diff --git a/src/app/GameBoard/page.tsx b/src/app/GameBoard/page.tsx index 666c2c34..287dc61b 100644 --- a/src/app/GameBoard/page.tsx +++ b/src/app/GameBoard/page.tsx @@ -2,7 +2,7 @@ "use client"; import React, { useState, useRef, useEffect, useContext } from "react"; import { Box, Grid2 as Grid } from "@mui/material"; -import { s3ImageURL } from "../_utils/s3Assets"; +import { s3ImageURL } from "../_utils/s3Utils"; import ChatDrawer from "../_components/Gameboard/_subcomponents/Overlays/ChatDrawer/ChatDrawer"; import OpponentCardTray from "../_components/Gameboard/OpponentCardTray/OpponentCardTray"; import Board from "../_components/Gameboard/Board/Board"; diff --git a/src/app/_components/Auth/AuthTypes.ts b/src/app/_components/Auth/AuthTypes.ts index b8e71b8f..58da403c 100644 --- a/src/app/_components/Auth/AuthTypes.ts +++ b/src/app/_components/Auth/AuthTypes.ts @@ -1,10 +1,10 @@ import React from "react"; -export interface LoginProps { +export interface ILoginProps { handleSubmit: (provider: "google" | "discord") => void; } -export interface StyledTextFieldProps { +export interface IStyledTextFieldProps { variant?: "outlined" | "filled" | "standard"; fullWidth?: boolean; value?: string | null; diff --git a/src/app/_components/Auth/Login/Login.tsx b/src/app/_components/Auth/Login/Login.tsx index 025302d1..325ecf07 100644 --- a/src/app/_components/Auth/Login/Login.tsx +++ b/src/app/_components/Auth/Login/Login.tsx @@ -2,9 +2,9 @@ import React from "react"; import { Box, Button, Card, CardContent, Typography } from "@mui/material"; -import { LoginProps } from "../AuthTypes"; +import { ILoginProps } from "../AuthTypes"; -const Login: React.FC = ({ handleSubmit }) => { +const Login: React.FC = ({ handleSubmit }) => { //------------------------STYLES------------------------// const loginStyles = { container: { diff --git a/src/app/_components/ClientProviders/ClientProviders.tsx b/src/app/_components/ClientProviders/ClientProviders.tsx index d4e0320e..2cabc51b 100644 --- a/src/app/_components/ClientProviders/ClientProviders.tsx +++ b/src/app/_components/ClientProviders/ClientProviders.tsx @@ -5,11 +5,11 @@ import { ThemeContextProvider } from "@/app/_contexts/Theme.context"; import { UserProvider } from "@/app/_contexts/User.context"; import { SessionProvider } from "next-auth/react"; -interface ClientProvidersProps { +interface IClientProvidersProps { children: React.ReactNode; } -const ClientProviders: React.FC = ({ children }) => { +const ClientProviders: React.FC = ({ children }) => { return ( diff --git a/src/app/_components/Gameboard/Board/Board.tsx b/src/app/_components/Gameboard/Board/Board.tsx index 1212d668..f0d76e37 100644 --- a/src/app/_components/Gameboard/Board/Board.tsx +++ b/src/app/_components/Gameboard/Board/Board.tsx @@ -2,9 +2,9 @@ import React from "react"; import Grid from "@mui/material/Grid2"; import UnitsBoard from "../_subcomponents/UnitsBoard"; import LeaderBaseBoard from "../../_sharedcomponents/LeaderBaseBoard/LeaderBaseBoard"; -import { BoardProps } from "@/app/_components/Gameboard/GameboardTypes"; +import { IBoardProps } from "@/app/_components/Gameboard/GameboardTypes"; -const Board: React.FC = ({ +const Board: React.FC = ({ sidebarOpen, }) => { //----------------Styles----------------// diff --git a/src/app/_components/Gameboard/GameboardTypes.ts b/src/app/_components/Gameboard/GameboardTypes.ts index 22324d59..35175c78 100644 --- a/src/app/_components/Gameboard/GameboardTypes.ts +++ b/src/app/_components/Gameboard/GameboardTypes.ts @@ -1,18 +1,18 @@ -import { CardData } from "@/app/_components/_sharedcomponents/Cards/CardTypes"; +import { ICardData } from "@/app/_components/_sharedcomponents/Cards/CardTypes"; -export type ParticipantType = "player" | "opponent"; +export type IParticipantType = "player" | "opponent"; -export interface Participant { +export interface IParticipant { id: string; name: string; - type: ParticipantType; + type: IParticipantType; initiative: boolean | null; deckSize: number; - cards: CardData[]; - fullDeck: CardData[]; + cards: ICardData[]; + fullDeck: ICardData[]; } -export interface ChatDrawerProps { +export interface IChatDrawerProps { sidebarOpen: boolean; toggleSidebar: () => void; chatHistory: string[]; @@ -22,48 +22,48 @@ export interface ChatDrawerProps { currentRound: number; } -export interface PlayerCardTrayProps { +export interface IPlayerCardTrayProps { trayPlayer: string; handleModalToggle: () => void; handleBasicPromptToggle: () => void; } -export interface OpponentCardTrayProps { +export interface IOpponentCardTrayProps { trayPlayer: string; } -export interface BoardProps { +export interface IBoardProps { sidebarOpen: boolean; } -export interface DeckDiscardProps { +export interface IDeckDiscardProps { trayPlayer: string; } -export interface ResourcesProps { +export interface IResourcesProps { trayPlayer: string; handleModalToggle?: () => void; } -export interface ResourcesOverlayProps { +export interface IResourcesOverlayProps { isModalOpen: boolean; handleModalToggle: () => void; } -export interface BasicPromptProps { +export interface IBasicPromptProps { isBasicPromptOpen: boolean; handleBasicPromptToggle: () => void; } -export interface CardAreaProps { - cards: CardData[]; +export interface ICardAreaProps { + cards: ICardData[]; } -export interface UnitsBoardProps { +export interface IUnitsBoardProps { sidebarOpen: boolean; arena: string; } -export interface PlayerHandProps { - cards: CardData[]; +export interface IPlayerHandProps { + cards: ICardData[]; } \ No newline at end of file diff --git a/src/app/_components/Gameboard/OpponentCardTray/OpponentCardTray.tsx b/src/app/_components/Gameboard/OpponentCardTray/OpponentCardTray.tsx index c8ad807a..4bfb26ab 100644 --- a/src/app/_components/Gameboard/OpponentCardTray/OpponentCardTray.tsx +++ b/src/app/_components/Gameboard/OpponentCardTray/OpponentCardTray.tsx @@ -3,10 +3,10 @@ import Grid from "@mui/material/Grid2"; import Resources from "../_subcomponents/PlayerTray/Resources"; import PlayerHand from "../_subcomponents/PlayerTray/PlayerHand"; import DeckDiscard from "../_subcomponents/PlayerTray/DeckDiscard"; -import { OpponentCardTrayProps } from "@/app/_components/Gameboard/GameboardTypes"; +import { IOpponentCardTrayProps } from "@/app/_components/Gameboard/GameboardTypes"; import { useGame } from "@/app/_contexts/Game.context"; -const OpponentCardTray: React.FC = ({ trayPlayer }) => { +const OpponentCardTray: React.FC = ({ trayPlayer }) => { //---------------Styles------------------- // const leftColumn = { display: "flex", diff --git a/src/app/_components/Gameboard/PlayerCardTray/PlayerCardTray.tsx b/src/app/_components/Gameboard/PlayerCardTray/PlayerCardTray.tsx index 34e26dff..4efcba53 100644 --- a/src/app/_components/Gameboard/PlayerCardTray/PlayerCardTray.tsx +++ b/src/app/_components/Gameboard/PlayerCardTray/PlayerCardTray.tsx @@ -4,10 +4,10 @@ import Resources from "../_subcomponents/PlayerTray/Resources"; import DeckDiscard from "../_subcomponents/PlayerTray/DeckDiscard"; import CardActionTray from "../_subcomponents/PlayerTray/CardActionTray"; import PlayerHand from "../_subcomponents/PlayerTray/PlayerHand"; -import { PlayerCardTrayProps } from "@/app/_components/Gameboard/GameboardTypes"; +import { IPlayerCardTrayProps } from "@/app/_components/Gameboard/GameboardTypes"; import { useGame } from "@/app/_contexts/Game.context"; -const PlayerCardTray: React.FC = ({ +const PlayerCardTray: React.FC = ({ trayPlayer, handleModalToggle, }) => { diff --git a/src/app/_components/Gameboard/_subcomponents/Overlays/ChatDrawer/ChatDrawer.tsx b/src/app/_components/Gameboard/_subcomponents/Overlays/ChatDrawer/ChatDrawer.tsx index d6b06e40..063c637a 100644 --- a/src/app/_components/Gameboard/_subcomponents/Overlays/ChatDrawer/ChatDrawer.tsx +++ b/src/app/_components/Gameboard/_subcomponents/Overlays/ChatDrawer/ChatDrawer.tsx @@ -2,9 +2,9 @@ import React, { forwardRef } from "react"; import { Drawer, Box, IconButton, Typography } from "@mui/material"; import { Settings, Close } from "@mui/icons-material"; import Chat from "@/app/_components/_sharedcomponents/Chat/Chat"; -import { ChatDrawerProps } from "@/app/_components/Gameboard/GameboardTypes"; +import { IChatDrawerProps } from "@/app/_components/Gameboard/GameboardTypes"; -const ChatDrawer = forwardRef( +const ChatDrawer = forwardRef( function ChatDrawer( { sidebarOpen, diff --git a/src/app/_components/Gameboard/_subcomponents/Overlays/Prompts/BasicPrompt.tsx b/src/app/_components/Gameboard/_subcomponents/Overlays/Prompts/BasicPrompt.tsx index f5345a41..c51258c3 100644 --- a/src/app/_components/Gameboard/_subcomponents/Overlays/Prompts/BasicPrompt.tsx +++ b/src/app/_components/Gameboard/_subcomponents/Overlays/Prompts/BasicPrompt.tsx @@ -12,9 +12,9 @@ import { } from "@mui/material"; import { Close } from "@mui/icons-material"; import { useGame } from "@/app/_contexts/Game.context"; -import { BasicPromptProps } from "@/app/_components/Gameboard/GameboardTypes"; +import { IBasicPromptProps } from "@/app/_components/Gameboard/GameboardTypes"; -const BasicPrompt: React.FC = ({ +const BasicPrompt: React.FC = ({ isBasicPromptOpen, handleBasicPromptToggle, }) => { @@ -54,7 +54,7 @@ const BasicPrompt: React.FC = ({ {playerState.promptTitle || ""} - {playerState.buttons.map((button: ButtonsProps) => ( + {playerState.buttons.map((button: IButtonsProps) => ( = ({ ); }; -interface PromptButtonProps { - button: ButtonsProps +interface IPromptButtonProps { + button: IButtonsProps sendGameMessage: (args: [string, string, string]) => void; } -interface ButtonsProps { +interface IButtonsProps { command: string; arg: string; text: string; uuid: string; } -const PromptButton: React.FC = ({ button, sendGameMessage }) => { +const PromptButton: React.FC = ({ button, sendGameMessage }) => { return (