Skip to content

Commit

Permalink
Feat/client (#19)
Browse files Browse the repository at this point in the history
* 🚀 Create client

* 🐛 Fix build

* 💄 Code lint
  • Loading branch information
bal7hazar authored Jan 20, 2025
1 parent 06438d3 commit b2c2460
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/components/navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
TrophyIcon,
} from "@cartridge/ui-next";
import { useMemo } from "react";
import { Link, useLocation, useMatch } from "react-router-dom";
import { Link, useLocation } from "react-router-dom";

export function Navigation() {
return (
Expand Down
8 changes: 7 additions & 1 deletion client/src/hooks/achievements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useConnection } from "./context";
import { useAccount } from "./account";
import { useProgressions } from "./progressions";
import { useTrophies } from "./trophies";
import { Task as ItemTask } from "@/components/achievements/trophy";

export interface Item {
id: string;
Expand All @@ -23,6 +22,13 @@ export interface Item {
tasks: ItemTask[];
}

export interface ItemTask {
id: string;
count: number;
total: number;
description: string;
}

export interface Counters {
[player: string]: { [quest: string]: { count: number; timestamp: number }[] };
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function useTokens(accountAddress?: string, tokens?: string[]) {
return useERC20Balance({
address: accountAddress ?? address,
contractAddress: [...options, ...(tokens ?? [])],
provider,
provider: provider as any, // Type assertion to bypass type mismatch
interval: isVisible ? 3000 : undefined,
});
}
Expand Down
1 change: 1 addition & 0 deletions client/tsconfig.app.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./src/constants.ts","./src/main.tsx","./src/vite-env.d.ts","./src/components/app.tsx","./src/components/games.tsx","./src/components/header.tsx","./src/components/home.tsx","./src/components/slot.tsx","./src/components/connection/connect.tsx","./src/components/connection/index.tsx","./src/components/connection/user.tsx","./src/components/inventory/index.tsx","./src/components/navigation/index.tsx","./src/components/scenes/inventory.tsx","./src/components/scenes/layout.tsx","./src/components/user/index.tsx","./src/connectors/index.ts","./src/context/arcade.tsx","./src/context/connection.tsx","./src/context/data.tsx","./src/context/index.tsx","./src/context/provider.tsx","./src/context/starknet.tsx","./src/context/theme.tsx","./src/data/index.ts","./src/helpers/index.ts","./src/hooks/account.ts","./src/hooks/achievements.ts","./src/hooks/arcade.ts","./src/hooks/collection.ts","./src/hooks/context.ts","./src/hooks/entrypoints.ts","./src/hooks/events.ts","./src/hooks/progressions.ts","./src/hooks/starknetid.ts","./src/hooks/token.ts","./src/hooks/trophies.ts","./src/hooks/username.ts","./src/hooks/wallet.ts","./src/models/index.ts","./src/models/progress.ts","./src/models/trophy.ts"],"version":"5.7.3"}
1 change: 1 addition & 0 deletions client/tsconfig.node.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./vite.config.ts"],"version":"5.7.3"}

0 comments on commit b2c2460

Please sign in to comment.