Coder Social home page Coder Social logo

orodrigogo / react-native-na-pratica-1 Goto Github PK

View Code? Open in Web Editor NEW
98.0 3.0 63.0 2.1 MB

😋🥗🍎 App que sugere receitas baseadas nos ingredientes selecionados.

TypeScript 97.26% PLpgSQL 2.20% JavaScript 0.53%
expo expo-router react-native supabase

react-native-na-pratica-1's Introduction

Banner

Links

🔴 Assista meus vídeos no YouTube: @orodrigogo

🔴 Figma do projeto: Cook App


Banner

Sobre o projeto

Imagine chegar em casa com fome depois de um dia de muito trabalho e lembrar que você esqueceu de passar no mercado para fazer as compras da semana. Então você decide abrir a geladeira pra fazer uma janta com o que já tem em casa, mas está sem muita criatividade pra cozinhar. É esse problema que o Cook App pode resolve! Nessa aula do evento React Native na prática vamos criar uma aplicação que sugere receitas conforme os ingredientes selecionados usando React Native, Expo, Expo router, Supabase e React Native reanimated.

react-native-na-pratica-1's People

Contributors

orodrigogo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-na-pratica-1's Issues

Problema em exibir a lista dos ingredientes selecionados da tela de detalhes no componente recipe/[id].tsx

Solução: Criar uma função no Supabase
CREATE OR REPLACE FUNCTION get_ingredients_by_recipe_id(p_recipe_id UUID) RETURNS TABLE (id UUID, name character varying, image text) AS $$ BEGIN RETURN QUERY SELECT i.id, i.name, i.image FROM recipes_ingredients ri INNER JOIN ingredients i ON ri.ingredient_id = i.id WHERE ri.recipe_id = p_recipe_id; END; $$ LANGUAGE plpgsql;

Substituir a função findByRecipeId em src\services\ingredientsService.ts por:
async function findByRecipeId(id: string) { const { data } = await supabase.rpc('get_ingredients_by_recipe_id', { p_recipe_id: id }); return data || []; }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.