Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed non-serializable error with capture.tsx #119

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .expo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
> Why do I have a folder named ".expo" in my project?
The ".expo" folder is created when an Expo project is started using "expo start" command.

> What do the files contain?
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
- "settings.json": contains the server configuration that is used to serve the application manifest.

> Should I commit the ".expo" folder?
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.

Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
8 changes: 8 additions & 0 deletions .expo/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hostType": "lan",
"lanType": "ip",
"dev": true,
"minify": false,
"urlRandomness": null,
"https": false
}
2 changes: 1 addition & 1 deletion source/frontend/app/StackParamList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export type CaptureStackParamList = {
Capture: undefined;
UserValid: {
receiptData: any;
onReturnToCamera: () => void;
// onReturnToCamera: () => void;
}; // Define the type of data passed
// Add other screens and their params in Account Stack if necessary
};
3 changes: 2 additions & 1 deletion source/frontend/pages/capture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ export class Capture extends Component<CaptureProps, CaptureState> {
// Assuming 'data' is the parsed receipt information
this.props.navigation.navigate("UserValid", {
receiptData: data, // Pass the parsed data to the next screen
onReturnToCamera: this.resetCamera,
// onReturnToCamera: this.resetCamera,
});
this.resetCamera();
} catch (error) {
console.error("Error submitting photo:", error);
alert("Failed to submit photo.");
Expand Down
Loading