Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐤🍒 ↝ Adjusting login params so you can use the site without logging i… #54

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import AccountAvatar, { AccountAvatarV1, AccountAvatarV2 } from "../components/A
import { url } from "inspector";
import AccountEditor from "../components/Core/UpdateProfile";
import DbHeader from "../components/Backend/Header";
import Login from "./login";
import IndexAuth from "../components/Core/indexAuth";
import Instructions from "../components/onboarding";

Expand All @@ -36,16 +35,9 @@ export default function Home() {

return (
<>
<CoreLayout>
{ !session && (
<Login />
)}
{ session && (
<><IndexAuth />
{/* <Instructions /> */}
</>
)}
</CoreLayout>
<CoreLayout>
<IndexAuth />
</CoreLayout>
</>
)
}
6 changes: 2 additions & 4 deletions pages/posts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ export function SocialGraphHomeModal () {

function fetchPosts () {
supabase.from('posts')
.select('id, content, created_at, media, profiles(id, avatar_url, username)') // Reset id on testing playground server later
.select('id, content, created_at, profiles(id, avatar_url, username)') // Reset id on testing playground server later
.limit(2)
.order('created_at', { ascending: false })
.then( result => { setPosts(result.data); });

supabase.from('posts_duplicate')
.select('id, content, created_at, media, planets2, planetsss(id, temperature), profiles(id, avatar_url, full_name, username)')
.select('id, content, created_at, planets2, planetsss(id, temperature), profiles(id, avatar_url, full_name, username)')
.limit(2)
.order('created_at', { ascending: false })
.then( result => { setPlanetPosts(result.data); });
Expand All @@ -140,8 +140,6 @@ export function SocialGraphHomeModal () {
})
}

if (!session) { return <Login />; };

return (
<Layout hideNavigation={true}>
<UserContext.Provider value={{profile}}> {/* Move this into `_app.tsx` later */}
Expand Down
9 changes: 1 addition & 8 deletions pages/tests/db.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useSession, useSupabaseClient } from "@supabase/auth-helpers-react";
import InfoFAQ from "../../components/Info/faq";
import { SocialGraphHomeModal } from "../posts";
import Login from "../login";
import Link from "next/link";

export default function Db () {
Expand All @@ -10,10 +9,6 @@ export default function Db () {

return (
<div className='container' style={{ padding: '50px 0 100px 0' }}>
{!session ? (
<></>
): (
<>
<section>
<div className="px-4 mx-auto max-w-7xl sm:px-6 md:px-12 lg:px-24">
<div className="flex flex-col w-full mb-12 text-center">
Expand Down Expand Up @@ -195,9 +190,7 @@ export default function Db () {
</span>
</div>
</div>
</footer>
</>
)}</div>
</footer></div>
)
}

Expand Down