Giter Club home page Giter Club logo

factube's People

Contributors

0bubbles0 avatar alisyad9 avatar danilo-cupido avatar moggach avatar

Stargazers

 avatar

factube's Issues

Charlie bit README! 👼

A README on your repo can introduce the project and give an idea of what you built and how you built it.

Draft your README early and continuing to update it throughout your project. This will save you time later on, and help make sure you don't forget anything! 🐘

The apprenticeship assessment focuses on documenting projects with this structure. Following this for your in-house and Tech for Better projects will give you a good understanding of how to write project documentation.

Code review - week one

Nice progress for the first week! ✨ 🎉 Here are a few things I noticed:

  • You're doing React.useState here quite a few times. Neater to import { useState } from 'react'.
  • Prefer arrow functions as React components eg. const Search = () => {}
  • you need an Id the same as the for attribute on this input to correctly associate the label
  • I don't think it effects functionality but getServerSideProps, getStaticProps etc. are normally used at the bottom of the file.
  • Can your api url be an env var?
  • Try and be consistent with components - if you're using Material UI containers - stick to it, unless there is a reason it doesn't work for you in a particular context

I've tried not comment on the bits it looks like you're not using atm.

Did I update my profile?

Would be good to have a confirmation message that let you know that your profile has been saved successfully

Great work 💓

It's amazing how many features you've managed to add. hard work ✌️✌️✌️

Centralise repeated session logic

const [session, setSession] = useState(null);
useEffect(() => {
setSession(supabase.auth.session());
supabase.auth.onAuthStateChange((_event, session) => {
setSession(session);
});
}, []);

You've got this identical bit of code for handling Supabase auth sessions in quite a few pages. Since it's likely that every page needs to know if you're logged in or not, you could put this into pages/_app.js. This components sits "above" all other pages, so any code in here will run for every page. You could then pass the session down as a prop to the pages:

// pages/_app.js

function MyApp({ Component, pageProps }) {
  const [session, setSession] = useState(null);
  useEffect(() => {
    setSession(supabase.auth.session());
    supabase.auth.onAuthStateChange((_event, session) => {
      setSession(session);
    });
  }, []);
  return (
    <Layout>
      <Component {...pageProps} session={session} />
    </Layout>
  );
}

What's a video ID?

I had to google what a video id was and where I might find it, might be good to include some examples to show what people need to put in

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.