Skip to content

refactor: update QR scanner to use current Expo Camera API#58

Merged
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
Phantomcall:fix/update-qr-scanner-to-current-expo-camera-api
Jun 29, 2026
Merged

refactor: update QR scanner to use current Expo Camera API#58
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
Phantomcall:fix/update-qr-scanner-to-current-expo-camera-api

Conversation

@Phantomcall

Copy link
Copy Markdown

Update QR scanner to use current Expo Camera API

Summary

Replace the legacy expo-camera/legacy import with the supported CameraView component from the current Expo Camera API. Removes the ESLint suppression workaround for unresolved imports.

Changes

  • app/access-scanner.tsx:
    • Replace Camera from expo-camera/legacy with CameraView from expo-camera
    • Replace CameraType.back enum with facing="back" string prop
    • Replace onBarCodeScanned with onBarcodeScanned
    • Replace barCodeScannerSettings with barcodeScannerSettings (camelCase key: barcodeTypes)
    • Replace BarCodeScanningResult type with BarcodeScanningResult
    • Remove // eslint-disable-next-line import/no-unresolved suppression comment

Verification

  • QR scanning still accepts valid GuildPass access payloads and navigates to /access-check
  • Invalid QR payloads still show error card with "Scan Again" button
  • Camera permission denied / permanently denied states remain functional
  • ESLint no longer suppressed for the camera import

Type of change

  • Refactor (no functional changes)

Acceptance Criteria

  • expo-camera/legacy is no longer imported
  • ESLint suppression for camera import is removed
  • QR scanning still accepts valid GuildPass access payloads
  • Invalid QR payloads still show a clear error and allow scanning again
  • Camera permission denied and permanently denied states remain usable

closes #48

Replace expo-camera/legacy imports with the supported CameraView component
from expo-camera. Remove ESLint suppression for unresolved imports.

- Camera -> CameraView
- CameraType.back -> facing="back"
- onBarCodeScanned -> onBarcodeScanned
- barCodeScannerSettings -> barcodeScannerSettings (with camelCase keys)
- BarCodeScanningResult -> BarcodeScanningResult

Closes Adamantine-guild#48

@Lakes41 Lakes41 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is still being rebuilt so this was do @Phantomcall

@Lakes41 Lakes41 merged commit 4cb193e into Adamantine-guild:main Jun 29, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate QR Scanner Away from Legacy Expo Camera API

3 participants