@@ -97,14 +90,14 @@ React.useEffect(() => {
No algorithms. Every profile searchable.
-
+
Built for Depth
Filter by any keyword and what matters most.
-
+
Community Owned
@@ -115,10 +108,16 @@ React.useEffect(() => {
{/* Spacer */}
-
-
- {profilePage()}
-
+ {userId &&
+ <>
+ {/*
*/}
+
+ >
+ }
);
diff --git a/app/profiles/page.tsx b/app/profiles/page.tsx
index 7263ea8..ec5b1dc 100644
--- a/app/profiles/page.tsx
+++ b/app/profiles/page.tsx
@@ -5,6 +5,7 @@ import React, {useCallback, useEffect, useState} from "react";
import {DropdownKey, ProfileData} from "@/lib/client/schema";
import {dropdownConfig, ProfileFilters} from "./ProfileFilters";
import Image from "next/image";
+import {useSession} from "next-auth/react";
// Disable static generation
export const dynamic = "force-dynamic";
@@ -41,6 +42,12 @@ type ProfileFilters = {
export default function ProfilePage() {
+ const {data: session} = useSession();
+ const userId = session?.user?.id
+ console.log("session:", userId)
+
+ // if (!userId) return
+
const [profiles, setProfiles] = useState
([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState('');
@@ -63,8 +70,7 @@ export default function ProfilePage() {
if (key === 'searchQuery') {
setText(value);
newFilters[filterKey] = value as never;
- }
- else if (['interests', 'coreValues', 'causeAreas', 'connections'].includes(key)) {
+ } else if (['interests', 'coreValues', 'causeAreas', 'connections'].includes(key)) {
const arrayKey = filterKey as 'interests' | 'coreValues' | 'causeAreas' | 'connections';
newFilters[arrayKey] = [...newFilters[arrayKey], value];
} else {
@@ -182,6 +188,8 @@ export default function ProfilePage() {
const onFilterChange = handleFilterChange
+ if (!userId) return
+
return (
diff --git a/app/register/page.tsx b/app/register/page.tsx
index add4926..feb3379 100644
--- a/app/register/page.tsx
+++ b/app/register/page.tsx
@@ -5,7 +5,7 @@ import Link from "next/link";
import {signIn} from "next-auth/react";
import {FcGoogle} from "react-icons/fc";
import {useSearchParams} from "next/navigation";
-import Image from "next/image";
+import {favIcon} from "@/lib/client/media";
export default function RegisterPage() {
@@ -149,7 +149,7 @@ function RegisterComponent() {
{/* The project is still in development...*/}
{/**/}
-
+ {favIcon()}
Get Started