mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
chore: fix demo dep issue
This commit is contained in:
@@ -11,19 +11,16 @@ import {
|
||||
} from "@/components/ui/card";
|
||||
import { CheckIcon, XIcon } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useParams, useRouter } from "next/navigation";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { client, organization } from "@/lib/auth-client";
|
||||
import { InvitationError } from "./invitation-error";
|
||||
import { Invitation } from "@/lib/auth-types";
|
||||
|
||||
export default function InvitationPage({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
export default function InvitationPage() {
|
||||
const params = useParams<{
|
||||
id: string;
|
||||
};
|
||||
}) {
|
||||
}>();
|
||||
const router = useRouter();
|
||||
const [invitationStatus, setInvitationStatus] = useState<
|
||||
"pending" | "accepted" | "rejected"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { SignInButton, SignInFallback } from "@/components/sign-in-btn";
|
||||
import { headers } from "next/headers";
|
||||
import { Suspense } from "react";
|
||||
|
||||
export default async function Home() {
|
||||
|
||||
@@ -49,9 +49,9 @@ function checkOptimisticSession(headers: Headers) {
|
||||
return !!guessIsSignIn;
|
||||
}
|
||||
|
||||
export function SignInFallback() {
|
||||
export async function SignInFallback() {
|
||||
//to avoid flash of unauthenticated state
|
||||
const guessIsSignIn = checkOptimisticSession(headers());
|
||||
const guessIsSignIn = checkOptimisticSession(await headers());
|
||||
return (
|
||||
<Link
|
||||
href={guessIsSignIn ? "/dashboard" : "/sign-in"}
|
||||
|
||||
Reference in New Issue
Block a user