Hey guys, its really crazy but I still get no data...
# help
a
Hey guys, its really crazy but I still get no data 😄 Could you plase have a look on my code and maybe could say me what Im doing wrong?
Copy code
//my supabase.js in my lib folder 
import { createClient } from "@supabase/supabase-js";

export const supabase = createClient(
  "XXXXXXX.co",
  "anaon-key"
);
and here my index.js
Copy code
import { supabase } from "../lib/supabase";


export default function Home(props) {
  async function getUsers() {
    const { data, error } = await   
    supabase.from("users").select();
    console.log(data);
    //data: [] WHTA THE HELL XD ?!
  }

  useEffect(() => {
    getUsers();
  }, []);

  return (
    <div className="App">
      <Head>
        <title>PageBuilder - Ambitive</title>
        <link rel="icon" href="/favicon.ico" />
      </Head>
    </div>
  );
}
here is my data: I really dont know why im getting no data 😦 I consoled.log my error nad its null so I think the request is successfully :/
g
Do you have RLS on and what are your settings? Is the user logged in or are you trying to access as a "public" table and have RLS turned off? The other answer is not correct as "*" is optional for the Javascript API and nothing in select () gets defaulted to select("*").
a
Thanks man that was the problem :/