diff --git a/components/startups/StartupProfileTile.tsx b/components/startups/StartupProfileTile.tsx index 76bd530..90e87a9 100644 --- a/components/startups/StartupProfileTile.tsx +++ b/components/startups/StartupProfileTile.tsx @@ -41,56 +41,56 @@ export default function StartupProfileTile({ } | null>(null); const [connectionMessage, setConnectionMessage] = useState(""); - const { rank } = useSupabase(); - const v1Community = rank && rank >= 1; - const v1Member = rank && rank >= 2; +// const { rank } = useSupabase(); +// const v1Community = rank && rank >= 1; +// const v1Member = rank && rank >= 2; const anonymousPersonImage = "https://www.shutterstock.com/image-vector/default-avatar-profile-icon-social-600nw-1677509740.jpg"; - const [isLoading, setIsLoading] = useState(false); +// const [isLoading, setIsLoading] = useState(false); - const sendConnectionMessage = useCallback(() => { - const session = supabase.auth.session(); - if (!session) return; - const { access_token: accessToken } = session; +// const sendConnectionMessage = useCallback(() => { +// const session = supabase.auth.session(); +// if (!session) return; +// const { access_token: accessToken } = session; - setIsLoading(true); - const body = JSON.stringify({ - recipient: profileEmail, - message: connectionMessage, - }); - fetch(CONNECTION_REQUEST_URL, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${accessToken}`, - }, - body, - }) - .then(async (response) => { - setConnectDialogOpen(false); - setIsLoading(false); +// setIsLoading(true); +// const body = JSON.stringify({ +// recipient: profileEmail, +// message: connectionMessage, +// }); +// fetch(CONNECTION_REQUEST_URL, { +// method: "POST", +// headers: { +// "Content-Type": "application/json", +// Authorization: `Bearer ${accessToken}`, +// }, +// body, +// }) +// .then(async (response) => { +// setConnectDialogOpen(false); +// setIsLoading(false); - if (response.ok) { - setConnectionStatus({ - success: true, - message: "Connection sent successfully!", - }); - } else { - const errorBody = await response.text(); - setConnectionStatus({ success: false, message: errorBody }); - } - }) - .catch((error) => { - console.log("Error sending connection request:", error); - setIsLoading(false); - setConnectionStatus({ - success: false, - message: "An error occurred while sending the connection request.", - }); - }); - }, [profileEmail, connectionMessage]); +// if (response.ok) { +// setConnectionStatus({ +// success: true, +// message: "Connection sent successfully!", +// }); +// } else { +// const errorBody = await response.text(); +// setConnectionStatus({ success: false, message: errorBody }); +// } +// }) +// .catch((error) => { +// console.log("Error sending connection request:", error); +// setIsLoading(false); +// setConnectionStatus({ +// success: false, +// message: "An error occurred while sending the connection request.", +// }); +// }); +// }, [profileEmail, connectionMessage]); return (
@@ -135,12 +135,12 @@ export default function StartupProfileTile({
@@ -168,7 +168,7 @@ export default function StartupProfileTile({ )} - + {/*
- {(v1Community || v1Member) && (

{`Message ${displayName} on Slack`}

- )} - {v1Member && (
@@ -252,27 +249,22 @@ export default function StartupProfileTile({
- )} - {/* {!(v1Community || v1Member) && (

Become a V1 Member to connect with {displayName}{" "} through email!

- )} */} - {/* {!(v1Community || v1Member) && (

Finish signing in to connect with members of V1!

- )} */}
- + */} ); }