mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
chore: qol patches
This commit is contained in:
parent
245044b33a
commit
906344d6f3
4 changed files with 64 additions and 20 deletions
|
|
@ -19,6 +19,17 @@ export function ModernHeroWithGradients() {
|
|||
<DarkModeGradient />
|
||||
|
||||
<div className="relative z-20 flex flex-col items-center justify-center overflow-hidden rounded-3xl p-4 md:p-12 lg:p-16">
|
||||
<div className="flex justify-center w-full mb-4">
|
||||
<Link href="https://github.com/MODSetter/SurfSense" target="_blank" rel="noopener noreferrer">
|
||||
<img
|
||||
src="https://trendshift.io/api/badge/repositories/13606"
|
||||
alt="MODSetter%2FSurfSense | Trendshift"
|
||||
style={{ width: "250px", height: "55px" }}
|
||||
width={250}
|
||||
height={55}
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
<Link
|
||||
href="/docs"
|
||||
className="flex items-center gap-1 rounded-full border border-gray-200 bg-gradient-to-b from-gray-50 to-gray-100 px-4 py-1 text-center text-sm text-gray-800 shadow-sm dark:border-[#404040] dark:bg-gradient-to-b dark:from-[#5B5B5D] dark:to-[#262627] dark:text-white dark:shadow-inner dark:shadow-purple-500/10"
|
||||
|
|
|
|||
|
|
@ -64,24 +64,8 @@ const DesktopNav = ({ navItems, visible }: NavbarProps) => {
|
|||
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
|
||||
|
||||
const handleGoogleLogin = () => {
|
||||
// Redirect to Google OAuth authorization URL
|
||||
fetch(`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/auth/google/authorize`)
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to get authorization URL');
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
if (data.authorization_url) {
|
||||
window.location.href = data.authorization_url;
|
||||
} else {
|
||||
console.error('No authorization URL received');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error during Google login:', error);
|
||||
});
|
||||
// Redirect to the login page
|
||||
window.location.href = '/login';
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue