Skip to content

Commit

Permalink
Merge pull request #49 from team4099/main
Browse files Browse the repository at this point in the history
make image look better
  • Loading branch information
CodingMaster121 authored Mar 8, 2025
2 parents 8b82166 + af0d12d commit d67b566
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 9 additions & 0 deletions scoutingapp/src/components/img/RobotImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ export function RobotImage(props: ComponentSetup) {
return (<>
{componentInside}
</>)
}

async function fileExists(imagePath: string): Promise<boolean> {
try {
const response = await fetch(imagePath, { method: "HEAD" });
return response.ok;
} catch {
return false;
}
}
5 changes: 1 addition & 4 deletions scoutingapp/src/components/texts/QRCodeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export function QRCodeModal(props: ComponentSetup){
*/

const addToLocalStorage = function () {
console.log(localStorage.getItem("codes") as string)
var currentData = JSON.parse(localStorage.getItem("codes") as string)
currentData[props.getValue["MatchKey"].join("")] = props.getValue["export"].text
localStorage.setItem("codes", JSON.stringify(currentData))
Expand All @@ -19,10 +18,8 @@ export function QRCodeModal(props: ComponentSetup){
const interval = setInterval(() => {
var requiredFinished = true

console.log(props.required)
for (const id of props.required){
console.log(props.getValue[id])
if (["", [], ","].includes(props.getValue[id]) ||
if (["", [], ","].includes(props.getValue[id]) ||
(props.getValue[id][0].length == 2 &&
(props.getValue[id][0] == "" || props.getValue[id][1] == "")
)
Expand Down

0 comments on commit d67b566

Please sign in to comment.