Skip to content

Commit

Permalink
review-ui: Review image alongside the incident
Browse files Browse the repository at this point in the history
This will help vet the images uploaded to the platform before they are
public.
  • Loading branch information
VoyTechnology committed Aug 22, 2023
1 parent 8fb550f commit 1a66e25
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.5",
"@saferplace/api": "^0.0.15",
"@saferplace/api": "^0.0.16",
"i18next": "^23.4.5",
"i18next-browser-languagedetector": "^7.1.0",
"leaflet": "^1.9.4",
Expand Down
3 changes: 2 additions & 1 deletion packages/review-ui/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_BACKEND=http://localhost:8001
BASE_URL=/review
BASE_URL=/review
VITE_CDN=http://localhost:9000
5 changes: 3 additions & 2 deletions packages/review-ui/.env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_BACKEND=https://review.safer.place
BASE_URL=https://review.safer.place
VITE_BACKEND=https://api.safer.place
BASE_URL=https://review.safer.place
VITE_CDN=http://cdn.safer.place
2 changes: 1 addition & 1 deletion packages/review-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.5",
"@saferplace/api": "^0.0.15",
"@saferplace/api": "^0.0.16",
"leaflet": "^1.9.4",
"oidc-react": "^3.2.2",
"react": "^18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/review-ui/src/routes/incident.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type Props = {
}

function Review({incident, onSubmit}: Props) {
console.debug('showing incident', incident.id)
console.debug('incident', incident)
const navigate = useNavigate();
const revalidator = useRevalidator();

Expand Down Expand Up @@ -55,6 +55,7 @@ function Review({incident, onSubmit}: Props) {
<Marker position={latlon(incident.coordinates)} />
</MapContainer>
</Box>
<img src={`${import.meta.env.VITE_CDN}/images/${incident.imageId}`} width='100%' />
</CardMedia>
<CardHeader>
<Typography variant='h4'>Review Incident {incident.id}</Typography>
Expand Down
1 change: 1 addition & 0 deletions packages/review-ui/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

interface ImportMetaEnv {
readonly VITE_BACKEND: string
readonly VITE_CDN: string
readonly VITE_OIDC_AUTHORITY: string
readonly VITE_OIDC_CLIENT_ID: string
readonly VITE_OIDC_REDIRECT_URL: string
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a66e25

Please sign in to comment.