Skip to content

Commit

Permalink
pushing all to main no testing (adding error for not selecting a team)
Browse files Browse the repository at this point in the history
  • Loading branch information
voidReq committed Feb 15, 2025
1 parent c3cac11 commit ba0974f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions turbo-scout/src/pages/match.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default function PitPage() {


<Button onClick={() => {
if(team == undefined || team == 0) {
alert("You need to pick a team before saving!!!@!!!!!!!@!@!@!@!#!@#!@#@#%#@$%@431723049817203948 712349081702349871023481092347b 092384");
return;
}
addEntry({ ...store, type: "match", user: configuration!.profile, timestamp: new Date() });
let match_number = getDataField("match_number") as number;
clearAllData();
Expand Down
4 changes: 4 additions & 0 deletions turbo-scout/src/pages/pit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export default function PitPage() {
})}

<Button onClick={() => {
if(team == undefined || team == 0) {
alert("You need to pick a team before saving!!!@!!!!!!!@!@!@!@!#!@#!@#@#%#@$%@431723049817203948 712349081702349871023481092347b 092384");
return;
}
addEntry({ ...store, type: "pit", user: configuration!.profile, timestamp: new Date() });
images.forEach((i, index) => {
addImage({ id: md5(i), data: i });
Expand Down
6 changes: 5 additions & 1 deletion turbo-scout/src/pages/strategy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useStrategyStore = create<FormStore>(formStoreDefaults);

export default function StrategyPage() {
const store = useStrategyStore();
const { setDataField, setTeam, clearAllData } = store;
const { setDataField, team, setTeam, clearAllData } = store;

const addEntry = useTurboStore(s => s.addEntry);
const addImage = useTurboStore(s => s.addImage);
Expand All @@ -34,6 +34,10 @@ export default function StrategyPage() {
}))} onChange={(v) => setTeam(parseInt(v!))} />

<Button onClick={async () => {
if(team == undefined || team == 0) {
alert("You need to pick a team before saving!!!@!!!!!!!@!@!@!@!#!@#!@#@#%#@$%@431723049817203948 712349081702349871023481092347b 092384");
return;
}
const { width, height, zoom } = excalidrawAPI!.getAppState();

const canvas = await exportToCanvas({
Expand Down

0 comments on commit ba0974f

Please sign in to comment.