Skip to content

Commit

Permalink
Move the db quering to the homepage for now...
Browse files Browse the repository at this point in the history
  • Loading branch information
kmiguel10 committed Oct 6, 2023
1 parent 2a405f6 commit 260e963
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/components/home/running.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { cookies } from "next/headers";
export const dynamic = "force-dynamic";

export default async function Running() {
const supabase = createServerComponentClient({ cookies });
const { data: runs } = await supabase.from("running").select();
// const supabase = createServerComponentClient({ cookies });
// const { data: runs } = await supabase.from("running").select();

return <div>RUNS</div>;
}
9 changes: 8 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ import ProfileHeader from "./components/ui/header";
import ContainerLayout from "./components/layouts/container";
import Contents from "./components/home/contents";
import Running from "./components/home/running";
import { createServerComponentClient } from "@supabase/auth-helpers-nextjs";
import { cookies } from "next/headers";

export const dynamic = "force-dynamic";

export default async function Home() {
const supabase = createServerComponentClient({ cookies });
const { data: runs } = await supabase.from("running").select();

export default function Home() {
return (
<>
<Base>
Expand Down

0 comments on commit 260e963

Please sign in to comment.