Skip to content

Commit

Permalink
robot images work now
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingMaster121 committed Mar 2, 2025
1 parent 0c41f80 commit f43c6e0
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
Binary file added scoutingapp/public/3136.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
2 changes: 2 additions & 0 deletions scoutingapp/src/components/img/Index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import {RobotImage} from "./RobotImage";
export {RobotImage}
6 changes: 3 additions & 3 deletions scoutingapp/src/components/img/RobotImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ComponentSetup } from "../interface"

export const emptyImage = <img
style={{width: "80%", height: "80%", alignItems: 'center', justifyContent: 'center'}}
src='../img/gray.png'
src='../public/gray.png'
alt={`Picture of robot`}
/>

Expand All @@ -17,15 +17,15 @@ export function RobotImage(props: ComponentSetup) {
setComponentInside(
<img
style={{ height: "300px", alignItems: 'center', justifyContent: 'center', margin: "auto"}}
src={`./src/components/img/${robotNumber}.jpeg`}
src={`../public/${robotNumber}.jpeg`}
alt={`Image of robot ${robotNumber} not found.`}
/>
)
} else {
setComponentInside(
<img
style={{ height: "300px", alignItems: 'center', justifyContent: 'center', margin: "auto"}}
src={`./src/components/img/gray.png`}
src={`../public/gray.png`}
alt={'Insert robot number above'}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion scoutingapp/src/getImagesTBA.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
if not (TBA_API_KEY and IMGUR_CLIENT_ID and IMGUR_ETAG and EVENT_KEY):
raise PermissionError("Some keys are missing! Go into code and insert your keys.")

FOLDER_PATH = './components/img'
FOLDER_PATH = 'public'

# Headers for the API request
TBA_HEADERS = {
Expand Down
27 changes: 27 additions & 0 deletions scoutingapp/src/image_errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
(122, 'Image not found.')
(346, 'Image not found.')
(401, 'Image not found.')
(422, 'Image not found.')
(619, 'Image not found.')
(836, 'Image not found.')
(977, 'Image not found.')
(1086, 'Image not found.')
(1793, 'Image not found.')
(1908, 'Image not found.')
(2028, 'Image not found.')
(2068, 'Image not found.')
(2363, 'Image not found.')
(2534, 'Image not found.')
(2890, 'Image not found.')
(2998, 'Image not found.')
(3072, 'Image not found.')
(3359, 'Image not found.')
(3939, 'Image not found.')
(4099, 'Image not found.')
(4286, 'Image not found.')
(4575, 'Image not found.')
(6194, 'Image not found.')
(6882, 'Image not found.')
(9214, 'Image not found.')
(10004, 'Image not found.')
(10499, 'Image not found.')
Binary file added scoutingapp/src/public/robotimages/3136.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f43c6e0

Please sign in to comment.