Skip to content

Commit

Permalink
banner
Browse files Browse the repository at this point in the history
  • Loading branch information
maamalama committed Sep 19, 2024
1 parent d2c86f8 commit e2e8eeb
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 40 deletions.
90 changes: 50 additions & 40 deletions web/pages/signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { supabaseServer } from "../lib/supabaseServer";
import { Result, err, ok } from "../lib/result";
import PublicMetaData from "../components/layout/public/publicMetaData";
import { useEffect } from "react";
import { InfoBox } from "../components/ui/helicone/infoBox"; // Import InfoBox

export type CustomerPortalContent = {
domain: string;
Expand Down Expand Up @@ -55,50 +56,59 @@ const SignIn = ({
return (
<PublicMetaData
description={
"How developers build AI applications. Get observability, tooling, fine-tuning, and evaluations out of the box. "
"How developers build AI applications. Get observability, tooling, fine-tuning, and evaluations out of the box."
}
ogImageUrl={"https://www.helicone.ai/static/helicone-og.webp"}
>
<AuthForm
handleEmailSubmit={async (email: string, password: string) => {
const { data, error } = await supabase.auth.signInWithPassword({
email: email,
password: password,
});
<div>
<div className="p-4 bg-[#F8FEFF]">
<InfoBox icon={() => <></>} className="flex flex-col">
<span className="text-red-600 text-sm font-semibold">
We are having issues with auth right now, we&apos;ll be back soon.
</span>
</InfoBox>
</div>
<AuthForm
handleEmailSubmit={async (email: string, password: string) => {
const { data, error } = await supabase.auth.signInWithPassword({
email: email,
password: password,
});

if (error) {
setNotification("Error logging in. Please try again.", "error");
console.error(error);
return;
}
setNotification("Success. Redirecting...", "success");
router.push("/dashboard");
}}
handleGoogleSubmit={async () => {
const { error } = await supabase.auth.signInWithOAuth({
provider: "google",
});
if (error) {
setNotification("Error logging in. Please try again.", "error");
console.error(error);
return;
}
setNotification("Successfully signed in.", "success");
}}
handleGithubSubmit={async () => {
const { error } = await supabase.auth.signInWithOAuth({
provider: "github",
});
if (error) {
setNotification("Error logging in. Please try again.", "error");
console.error(error);
return;
}
setNotification("Successfully signed in.", "success");
}}
authFormType={"signin"}
customerPortalContent={customerPortalContent}
/>
if (error) {
setNotification("Error logging in. Please try again.", "error");
console.error(error);
return;
}
setNotification("Success. Redirecting...", "success");
router.push("/dashboard");
}}
handleGoogleSubmit={async () => {
const { error } = await supabase.auth.signInWithOAuth({
provider: "google",
});
if (error) {
setNotification("Error logging in. Please try again.", "error");
console.error(error);
return;
}
setNotification("Successfully signed in.", "success");
}}
handleGithubSubmit={async () => {
const { error } = await supabase.auth.signInWithOAuth({
provider: "github",
});
if (error) {
setNotification("Error logging in. Please try again.", "error");
console.error(error);
return;
}
setNotification("Successfully signed in.", "success");
}}
authFormType={"signin"}
customerPortalContent={customerPortalContent}
/>
</div>
</PublicMetaData>
);
};
Expand Down
8 changes: 8 additions & 0 deletions web/pages/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PublicMetaData from "../components/layout/public/publicMetaData";
import { GetServerSidePropsContext } from "next";
import posthog from "posthog-js";
import { InfoBanner } from "../components/shared/themed/themedDemoBanner";
import { InfoBox } from "../components/ui/helicone/infoBox";

const SignUp = () => {
const supabase = useSupabaseClient();
Expand Down Expand Up @@ -39,6 +40,13 @@ const SignUp = () => {
ogImageUrl={"https://www.helicone.ai/static/helicone-og.webp"}
>
{demo === "true" && <InfoBanner />}
<div className="p-4 bg-[#F8FEFF]">
<InfoBox icon={() => <></>} className="flex flex-col">
<span className="text-red-600 text-sm font-semibold">
We are having issues with auth right now, we&apos;ll be back soon.
</span>
</InfoBox>
</div>
<AuthForm
handleEmailSubmit={async (email: string, password: string) => {
const origin = window.location.origin;
Expand Down

0 comments on commit e2e8eeb

Please sign in to comment.