diff --git a/src/app/_components/Gameboard/GameboardTypes.ts b/src/app/_components/Gameboard/GameboardTypes.ts index 7e13318e..35175c78 100644 --- a/src/app/_components/Gameboard/GameboardTypes.ts +++ b/src/app/_components/Gameboard/GameboardTypes.ts @@ -1,11 +1,11 @@ import { ICardData } from "@/app/_components/_sharedcomponents/Cards/CardTypes"; -export type ParticipantType = "player" | "opponent"; +export type IParticipantType = "player" | "opponent"; export interface IParticipant { id: string; name: string; - type: ParticipantType; + type: IParticipantType; initiative: boolean | null; deckSize: number; cards: ICardData[]; diff --git a/src/app/_components/HomePage/HomePageTypes.ts b/src/app/_components/HomePage/HomePageTypes.ts index 1599fc4d..af142932 100644 --- a/src/app/_components/HomePage/HomePageTypes.ts +++ b/src/app/_components/HomePage/HomePageTypes.ts @@ -17,7 +17,7 @@ export interface IPublicGamesProps { format: string; } -export type Article = { +export type IArticle = { title: string; content: string; date: string; @@ -26,5 +26,5 @@ export type Article = { }; export interface INewsItemProps { - article: Article; + article: IArticle; } diff --git a/src/app/_constants/mockData.ts b/src/app/_constants/mockData.ts index 1d62bd2b..cb9caf70 100644 --- a/src/app/_constants/mockData.ts +++ b/src/app/_constants/mockData.ts @@ -1,4 +1,4 @@ -import { Article } from "@/app/_components/HomePage/HomePageTypes"; +import { IArticle } from "@/app/_components/HomePage/HomePageTypes"; export const playerMatches = [ { @@ -83,7 +83,7 @@ export const playerMatches = [ }, ]; -export const articles: Article[] = [ +export const articles: IArticle[] = [ { title: "Welcome to the Karabast Beta!", content: ` diff --git a/src/app/_utils/s3Utils.ts b/src/app/_utils/s3Utils.ts index 5d792dab..46a94399 100644 --- a/src/app/_utils/s3Utils.ts +++ b/src/app/_utils/s3Utils.ts @@ -57,10 +57,10 @@ interface IServerDeckData { } // types of mapping -type Mapping = { +type IMapping = { [id:string]: string; } -type idToInternalNameMapping = { +type IIdToInternalNameMapping = { "id": string, "internalName": string, "title": string, @@ -80,7 +80,7 @@ export const s3CardImageURL = (card: ICardData) => { // Helper function to update a card's id -export const updateIdsWithMapping = (data: IDeckData, mapping: Mapping): IDeckData => { +export const updateIdsWithMapping = (data: IDeckData, mapping: IMapping): IDeckData => { const updateCard = (card: IDeckCard): IDeckCard => { const updatedId = mapping[card.id] || card.id; // Use mapping if available, else keep the original id @@ -99,7 +99,7 @@ export const updateIdsWithMapping = (data: IDeckData, mapping: Mapping): IDeckDa // Helper function to update a cards id to its internal name export function mapIdToInternalName( - mapper: idToInternalNameMapping[], + mapper: IIdToInternalNameMapping[], deckData: IDeckData ): IDeckData { // Convert the mapper array to a lookup map for faster access