fix: topic for guest auth (#149)

* wip

* chore: redirect instead of toast

* refactor: remove useRouter
This commit is contained in:
Aslam
2024-09-08 04:30:11 +07:00
committed by GitHub
parent 9e4544894c
commit cb9e8f46da
5 changed files with 215 additions and 256 deletions

View File

@@ -15,7 +15,6 @@ import { PageSection } from "./partial/page-section"
import { TopicSection } from "./partial/topic-section"
import { ProfileSection } from "./partial/profile-section"
import { useAccountOrGuest } from "@/lib/providers/jazz-provider"
import { SignInButton } from "@clerk/nextjs"
interface SidebarContextType {
isCollapsed: boolean
@@ -126,15 +125,9 @@ const SidebarContent: React.FC = React.memo(() => {
{me._type === "Account" && <PageSection pathname={pathname} />}
{me._type === "Account" && <TopicSection pathname={pathname} />}
</div>
</nav>
{me._type === "Account" ? (
<ProfileSection />
) : (
<div className="visible absolute inset-x-0 bottom-0 z-10 flex gap-8 p-2.5">
<SignInButton>Fake profile section</SignInButton>
</div>
)}
</nav>
</>
)
})