[go: nahoru, domu]

Skip to content

Commit

Permalink
3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatXliner committed Feb 26, 2024
1 parent 638e2d6 commit 9ff3a11
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion apps/WarriorHappy/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "WarriorHappy",
"slug": "WarriorHappy",
"version": "3.1.1",
"version": "3.1.2",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
Expand Down
2 changes: 1 addition & 1 deletion apps/WarriorHappy/ios/WarriorHappy/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.1.1</string>
<string>3.1.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion apps/WarriorHappy/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "warriorhappy",
"main": "index.ts",
"version": "3.1.1",
"version": "3.1.2",
"scripts": {
"start": "expo start",
"android": "expo run:android",
Expand Down
4 changes: 2 additions & 2 deletions apps/WarriorHappy/src/app/match/Endgame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export default function Endgame({
<View className="mt-5">
<Text className="pl-3 text-lg">Scoring (Trap=🚪, Hanging=⛓️)</Text>
<ActionGrid
actions={["Miss 🚪", "Miss ⛓️", "Score 🚪", "Score ⛓️"]}
actions={["Miss 🚪", "Miss ⛓️", "Score 🚪", "Score ⛓️", "Park"]}
history={ultimateHistory.log}
setHistory={setHistory}
themeOverrides={["red", "red", "green", "green"]}
themeOverrides={["red", "red", "green", "green", "gray"]}
/>
</View>
);
Expand Down
17 changes: 9 additions & 8 deletions apps/WarriorHappy/src/app/match/[matchId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function Match() {
const rawUpdate = api.scouting.updateMatchLog.useMutation({
onSuccess: (data, variables, context) => {
console.log("data", data, variables, context);

utils.scouting.getMatchLog.setData(key, [variables]);
// utils.scouting.getMatchLog.invalidateQuery();
},
Expand All @@ -48,8 +49,8 @@ export default function Match() {
// endgame: UltimateHistory;
// } | null>(null);
// // TODO: Pre-emptively cache
const { data, isLoading } = api.scouting.getMatchLog.useQuery(key);

const { data, isLoading, isError } = api.scouting.getMatchLog.useQuery(key);
console.log("daata", data, isError);
// const update = useCallback(
// (h) => {
// rawUpdate.mutate({
Expand All @@ -62,8 +63,8 @@ export default function Match() {
// );
// useEffect(() => {
// if (!isLoading) {
// console.log("set", data[0].eventLog);
// setGodlyHistory(data[0].eventLog);
// console.log("set", data[0].event_log);
// setGodlyHistory(data[0].event_log);
// }
// }, [isLoading]);
// // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
Expand All @@ -79,7 +80,7 @@ export default function Match() {
// </SafeAreaView>
// );
// }
const godlyHistory = data?.[0]?.eventLog as {
const godlyHistory = data?.[0]?.event_log as {
auto: UltimateHistory;
teleop: UltimateHistory;
endgame: UltimateHistory;
Expand Down Expand Up @@ -111,7 +112,7 @@ export default function Match() {
console.log("stuff", stuff);
rawUpdate.mutate({
...key,
eventLog: { ...godlyHistory, auto: stuff },
event_log: { ...godlyHistory, auto: stuff },
});
}}
/>
Expand All @@ -124,7 +125,7 @@ export default function Match() {
setUltimateHistory={(stuff) => {
rawUpdate.mutate({
...key,
eventLog: { ...godlyHistory, teleop: stuff },
event_log: { ...godlyHistory, teleop: stuff },
});
}}
/>
Expand All @@ -136,7 +137,7 @@ export default function Match() {
setUltimateHistory={(stuff) => {
rawUpdate.mutate({
...key,
eventLog: { ...godlyHistory, endgame: stuff },
event_log: { ...godlyHistory, endgame: stuff },
});
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/router/scouting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const scoutingRouter = createTRPCRouter({
// biome-ignore lint/style/noNonNullAssertion: The match should be guaranteed to map to a singular event
eventKey: x.matches!.event,
// biome-ignore lint/style/noNonNullAssertion: see above
eventName: "x.matches!.events![0]!.name",
eventName: x.matches!.events[0].name,
// biome-ignore lint/style/noNonNullAssertion: see above
team: parseInt(x.team.match(/\d+/)![0]),
red: redTeams,
Expand Down

0 comments on commit 9ff3a11

Please sign in to comment.