Skip to content

Commit e548633

Browse files
authored
Fixes broken types after CI (#47)
* type fixes * add ci flow
1 parent 1db058a commit e548633

3 files changed

Lines changed: 46 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
env:
13+
NODE_VERSION: "22.17.0"
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ env.NODE_VERSION }}
23+
cache: "npm"
24+
cache-dependency-path: |
25+
server/package-lock.json
26+
client/package-lock.json
27+
28+
- name: Install server dependencies
29+
run: |
30+
cd server
31+
npm ci
32+
33+
- name: Install client dependencies
34+
run: |
35+
cd client
36+
npm ci
37+
38+
- name: Build client
39+
run: |
40+
cd client
41+
npm run build:staging
42+
echo "✅ Client build validation completed"

client/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BoltSDK } from "@boltpay/bolt-js";
66
BoltSDK.initialize({
77
publishableKey: import.meta.env.VITE_BOLT_PUBLISHABLE_KEY,
88
gameId: import.meta.env.VITE_GAME_ID,
9-
environment: "Development",
9+
environment: "development",
1010
});
1111

1212
render(<App />, document.getElementById("app")!);

client/src/pages/Game.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import CharacterImage from "../assets/Character_l_Sample01.png";
33
import GameOverOverlay from "../components/GameOverOverlay";
44
import "./Game.css";
55
import { BoltSDK, type PreloadedAd } from "@boltpay/bolt-js";
6-
import { env } from "../configs/env";
76

87
interface GameState {
98
score: number;
@@ -40,8 +39,7 @@ export default function Game() {
4039
}, []);
4140

4241
const preloadAd = () => {
43-
const ad = BoltSDK.gaming.preloadAd(env.AD_LINK, {
44-
type: "untimed",
42+
const ad = BoltSDK.gaming.preloadAd({
4543
onClaim: () => {
4644
handleRestartClick();
4745
},
@@ -51,7 +49,7 @@ export default function Game() {
5149

5250
const initGame = (
5351
canvas: HTMLCanvasElement,
54-
ctx: CanvasRenderingContext2D
52+
ctx: CanvasRenderingContext2D,
5553
) => {
5654
preloadAd();
5755

@@ -167,7 +165,7 @@ export default function Game() {
167165
function checkCollision(
168166
dinoX: number,
169167
dinoY: number,
170-
obstacle: { x: number; y: number; width: number; height: number }
168+
obstacle: { x: number; y: number; width: number; height: number },
171169
): boolean {
172170
// Character image bounds (adjusted for the new character image)
173171
const dinoBox = {

0 commit comments

Comments
 (0)