Skip to content

Commit 1329106

Browse files
committed
Fix more random tsc errors
1 parent 29fca1f commit 1329106

7 files changed

Lines changed: 17 additions & 18 deletions

File tree

.yarn/install-state.gz

-937 Bytes
Binary file not shown.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"blockly": "10.0.0",
1616
"graphql": "16.8.1",
1717
"@types/node": "22.10.5",
18+
"@types/react": "18.3.18",
19+
"@types/react-dom": "18.3.5",
1820
"typescript": "5.3.3",
1921
"postgraphile": "^5.0.0-beta.37"
2022
},

spellsource-web/src/components/collection/collection.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { FunctionComponent, useContext, useEffect, useState } from "react
33
import { CardType } from "../../__generated__/spellsource-game";
44
import { CollectionCardFragment, CollectionCardsOrderBy, useGetCollectionCardsQuery } from "../../__generated__/client";
55
import { CardDef } from "./card-display";
6-
import { Button, Dropdown, Form, Table } from "react-bootstrap";
6+
import { Button as RBButton, Dropdown, Form, Table } from "react-bootstrap";
77
import { toTitleCaseCorrected } from "../../lib/blockly-spellsource-utils";
88
import { clamp } from "lodash";
99
import DropdownToggle from "react-bootstrap/DropdownToggle";
@@ -16,6 +16,8 @@ import Link from "next/link";
1616
import { useDrag, useDrop } from "react-dnd";
1717
import { CardCache } from "../../pages/collection";
1818

19+
const Button = RBButton as React.ComponentType<any>;
20+
1921
const ShowCardTypes: CardType[] = ["MINION", "SPELL", "WEAPON", "HERO", "HERO_POWER", "CLASS"];
2022
const DefaultShowCardTypes: CardType[] = ["MINION", "SPELL", "WEAPON"];
2123
const defaultLimit = 25;
@@ -43,7 +45,7 @@ const CardRow: FunctionComponent<{
4345

4446
const { classes, setHeroClass, classColors, addToDeck } = collection;
4547

46-
const [, dragRef, dragPreview] = useDrag({
48+
const [, dragRef, _] = useDrag({
4749
type: "collection-card",
4850
item: { id: cardScript.id },
4951
canDrag: () => !!collection.addToDeck,
@@ -88,8 +90,8 @@ interface CollectionProps {
8890
}
8991

9092
const Collection: FunctionComponent<CollectionProps> = (props) => {
91-
const { classes, classColors, heroClass, setHeroClass, offset, setOffset, mainHeroClass, addToDeck, removeFromDeck } = props;
92-
const { data: session, status } = useSession();
93+
const { classes, heroClass, setHeroClass, offset, setOffset, mainHeroClass, addToDeck, removeFromDeck } = props;
94+
const { data: session } = useSession();
9395

9496
const cache = useContext(CardCache);
9597

spellsource-web/src/components/collection/deck.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React, { FunctionComponent, useContext } from "react";
22
import _, { isEqual } from "lodash";
33
import { textDecorationStyle } from "./collection";
4-
import { Button } from "react-bootstrap";
4+
import { Button as RBButton } from "react-bootstrap";
5+
6+
const Button = RBButton as React.ComponentType<any>;
57
import { useDrag, useDrop } from "react-dnd";
68
import { GetDeckQuery, GetDeckQueryVariables, GetDecksQuery, GetDecksQueryVariables, useCreateDeckMutation, useDeleteDeckMutation, useRenameDeckMutation, useSetCardsInDeckMutation } from "../../__generated__/client";
79
import { ListActions } from "react-use/lib/useList";

spellsource-web/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@
116116
"**/*.tsx"
117117
],
118118
"exclude": [
119-
"node_modules"
119+
"node_modules",
120+
"build",
121+
".next"
120122
]
121123
}

spellsource-web/tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

yarn.lock

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7147,7 +7147,7 @@ __metadata:
71477147
languageName: node
71487148
linkType: hard
71497149

7150-
"@types/react-dom@npm:^18.0.11":
7150+
"@types/react-dom@npm:18.3.5":
71517151
version: 18.3.5
71527152
resolution: "@types/react-dom@npm:18.3.5"
71537153
peerDependencies:
@@ -7193,16 +7193,7 @@ __metadata:
71937193
languageName: node
71947194
linkType: hard
71957195

7196-
"@types/react@npm:*, @types/react@npm:>=16.9.11":
7197-
version: 19.0.3
7198-
resolution: "@types/react@npm:19.0.3"
7199-
dependencies:
7200-
csstype: "npm:^3.0.2"
7201-
checksum: 10c0/90129c45f2f09154d9409964964d0ccbac7f04d5f7fcf73fc146d33887931fbfdfd1e2947514298f94f986cc264aff8ba3201e9a4ea207d3308f20a06d47c805
7202-
languageName: node
7203-
linkType: hard
7204-
7205-
"@types/react@npm:^18.0.28":
7196+
"@types/react@npm:18.3.18":
72067197
version: 18.3.18
72077198
resolution: "@types/react@npm:18.3.18"
72087199
dependencies:

0 commit comments

Comments
 (0)