Giter Site home page Giter Site logo

marucs-diet's Introduction

SolidStart

Everything you need to build a Solid project, powered by solid-start;

Creating a project

# create a new project in the current directory
npm init solid@latest

# create a new project in my-app
npm init solid@latest my-app

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

Solid apps are built with presets, which optimise your project for deployment to different environments.

By default, npm run build will generate a Node app that you can run with npm start. To use a different preset, add it to the devDependencies in package.json and specify in your app.config.js.

This project was created with the Solid CLI

marucs-diet's People

Contributors

marcuscastelo avatar

Watchers

 avatar

marucs-diet's Issues

remover duplicação de código e usar a busca do supabase

//TODO: remover duplicação de código e usar a busca do supabase
ifCached: async (): Promise<Food[]> => {
const { data, error } = await supabase.from(TABLE).select('*');
console.log(`Got ${data?.length} foods from cache.`)
if (error) {
console.error(error);


This issue was generated by todo-issue based on a TODO comment in 82fbe66. It's been assigned to @marcuscastelo because they committed the code.

tratar erros e fazer o filtro na query

// TODO: tratar erros e fazer o filtro na query
const cached = ((await supabase.from(TABLE).select('*')).data ?? []).map((data) => cachedSearchSchema.parse(data));
return cached.some((cache) => cache.search.toLowerCase() === search.toLowerCase());
}
export const markAsCached = async (search: string) => {


This issue was generated by todo-issue based on a TODO comment in 82fbe66. It's been assigned to @marcuscastelo because they committed the code.

fix 'Nenhum alimento encontrado para a busca' being showed while still searching */}

{/* TODO: fix 'Nenhum alimento encontrado para a busca' being showed while still searching */}
{!searchingFoods && !typing && filteredFoods.length == 0 && <Alert color="warning" className="mt-2">Nenhum alimento encontrado para a busca &quot;{search}&quot;.</Alert>}
<MealItemAddModal modalId={MEAL_ITEM_ADD_MODAL_ID} meal={meal} itemData={{


This issue was generated by todo-issue based on a TODO comment in 03255fa. It's been assigned to @marcuscastelo because they committed the code.

retriggered: remover duplicação de código e usar a busca do supabase

//TODO: retriggered: remover duplicação de código e usar a busca do supabase
ifCached: async (): Promise<Food[]> => {
const { data, error } = await supabase.from(TABLE).select().ilike('name', `%${search}%`).limit(limit ?? 100);
console.log(`Got ${data?.length} foods from cache.`);
if (data?.length === 0) {
//TODO: readd this logic of cache invalidation, but also with time


This issue was generated by todo-issue based on a TODO comment in 03255fa. It's been assigned to @marcuscastelo because they committed the code.

tratar erros (também no resto dos controllers)

//TODO: tratar erros (também no resto dos controllers)
export const listDays = async (userId: User['id']): Promise<Day[]> =>
((await supabase.from(TABLE).select('*')).data ?? [])
.map(day => daySchema.parse(day))
.filter((day) => day.owner === userId)
.map((day): Day => ({


This issue was generated by todo-issue based on a TODO comment in 82fbe66. It's been assigned to @marcuscastelo because they committed the code.

Implement free day/meal

Day options section on top of meals (for now just free day)

  1. Red text on calendar selection
  2. Dark red background instead of black on daymeals page
  3. Hidden from macro charts

Remove all useAppDispatch and useAppSelector

// TODO: remover todos os useAppDispatch e useAppSelector do projeto
import { useAppDispatch, useAppSelector } from "@/redux/hooks";
import { Dropdown } from "react-daisyui";
import { useUser } from "@/redux/features/userSlice";
import { useEffect, useState } from "react";
import { User } from "@/model/userModel";


This issue was generated by todo-issue based on a TODO comment in 4e25eb7. It's been assigned to @marcuscastelo because they committed the code.

readd this logic of cache invalidation, but also with time

console.log('No foods found, unmarking cache as cached.'); await unmarkAsCached(search);


//TODO: readd this logic of cache invalidation, but also with time
// console.log('No foods found, unmarking cache as cached.');
// await unmarkAsCached(search);
}
if (error) {


This issue was generated by todo-issue based on a TODO comment in 03255fa. It's been assigned to @marcuscastelo because they committed the code.

retriggered: make buttons work */}

{/* //TODO: retriggered: make buttons work */}
{/* if there is a button in form, it will close the modal */}
<button className="btn" onClick={(e) => {
e.preventDefault();
hideModal(window, modalId); // TODO: retriggered: remove this and use state/modal component
}} >


This issue was generated by todo-issue based on a TODO comment in 03255fa. It's been assigned to @marcuscastelo because they committed the code.

revisar esse cast

//TODO: revisar esse cast
const TBCA = TBCAJson as unknown as { [key: string]: Food }
export async function deleteAndReimportFoods(progressCallback?: (total: number) => void) {
const total = Object.values(TBCA).length;


This issue was generated by todo-issue based on a TODO comment in 82fbe66. It's been assigned to @marcuscastelo because they committed the code.

retriggered: useUser hook (all over the entire app. Search for useAppDispatch, useAppSelector and dispatch)

marucs-diet/app/App.tsx

Lines 9 to 14 in 82fbe66

//TODO: useUser hook (all over the entire app. Search for useAppDispatch, useAppSelector and dispatch)
const dispatch = useAppDispatch();
const onChangeUser = (user: User) => dispatch(setUserJson(JSON.stringify(user)));
listUsers().then(users => {
const localStoredUserId = ((typeof window !== 'undefined') && localStorage) ? parseInt(localStorage.getItem('user') ?? '') : null;
if (localStoredUserId) {


This issue was generated by todo-issue based on a TODO comment in 82fbe66. It's been assigned to @marcuscastelo because they committed the code.

TBCA Cast

//TODO: retriggered: revisar esse cast
const TBCA = TBCAJson as unknown as { [key: string]: Food }
export async function deleteAndReimportFoods(progressCallback?: (total: number) => void) {


This issue was generated by todo-issue based on a TODO comment in 03255fa. It's been assigned to @marcuscastelo because they committed the code.

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.