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

Added shared pantry feature #67

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Added shared pantry feature #67

merged 2 commits into from
Oct 22, 2024

Conversation

nico-iaco
Copy link
Owner

This pull request includes several changes to the backend API integration, the addition of new pantry-related features, and updates to the frontend components to support these changes. The most significant changes involve modifying API endpoints, adding new pantry-related functionalities, and updating the frontend to handle the new data.

Backend API Integration:

  • API Endpoint Modifications:

    • Updated the getAllItems function to include pantryId as a query parameter in src/api/itemApis.ts.
    • Removed userid from multiple meal-related API functions in src/api/mealApis.ts. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • New Pantry API Functions:

    • Added new functions for creating, fetching, and sharing pantries in src/api/pantryApis.ts.

Frontend Components:

  • State Management Updates:

    • Added SET_CURRENT_PANTRY_TYPE and setCurrentPantry action in src/action/Action.ts. [1] [2]
  • Component Updates:

    • Updated ChooseFoodComponent to use currentPantry instead of currentUser in src/component/ChooseFoodComponent.tsx. [1] [2]
    • Removed currentUser from CompleteFoodConsumptionComponent in src/component/CompleteFoodConsumptionComponent.tsx. [1] [2] [3]
  • New Pantry Components:

    • Added PantryDataComponent for handling pantry data input in src/component/PantryDataComponent.tsx.
    • Added PantrySelectionDialogComponent for selecting a pantry in src/component/PantrySelectionDialogComponent.tsx.
    • Added PantryShareDialogComponent for sharing a pantry via QR code in src/component/PantryShareDialogComponent.tsx.

Configuration:

  • Firebase Configuration:

    • Updated firebase.json to include a new route for pantry API in firebase.json.
  • Nginx Configuration:

    • Added new location blocks for pantry API in nginx.conf.

Dependencies:

  • New Dependency:
    • Added react-qr-code to package.json.

Copy link

Visit the preview URL for this PR (updated for commit 8481488):

https://foody-me--preview-2rm4qplu.web.app

(expires Mon, 21 Oct 2024 12:43:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 18bacf4b1feeee4d88aaa8779f4fe19f257340ff

@nico-iaco nico-iaco merged commit 6a2bff2 into master Oct 22, 2024
2 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.

1 participant