Server Chanegs

This commit is contained in:
Manesh 2026-03-16 22:14:15 +00:00
parent cf6c4005dd
commit dfc2f251db
2 changed files with 21 additions and 3 deletions

View File

@ -1,10 +1,10 @@
"use client"; "use client";
import { useEffect, useState } from "react"; import { Suspense, useEffect, useState } from "react";
import { useRouter, useSearchParams } from "next/navigation"; import { useRouter, useSearchParams } from "next/navigation";
import { apiFetch } from "@/lib/api"; import { apiFetch } from "@/lib/api";
export default function GoogleCallbackPage() { function GoogleCallbackContent() {
const router = useRouter(); const router = useRouter();
const searchParams = useSearchParams(); const searchParams = useSearchParams();
const [status, setStatus] = useState<"loading" | "success" | "error">("loading"); const [status, setStatus] = useState<"loading" | "success" | "error">("loading");
@ -83,3 +83,22 @@ export default function GoogleCallbackPage() {
</div> </div>
); );
} }
function GoogleCallbackFallback() {
return (
<div className="min-h-screen flex items-center justify-center bg-background">
<div className="glass-panel rounded-2xl p-10 text-center max-w-sm w-full shadow-lg">
<div className="h-12 w-12 rounded-full border-4 border-primary border-t-transparent animate-spin mx-auto mb-4" />
<p className="text-sm text-muted-foreground">Connecting your Google account...</p>
</div>
</div>
);
}
export default function GoogleCallbackPage() {
return (
<Suspense fallback={<GoogleCallbackFallback />}>
<GoogleCallbackContent />
</Suspense>
);
}

1
package-lock.json generated
View File

@ -1433,7 +1433,6 @@
"version": "2.3.2", "version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,