Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix PR comments

Sara Vieira75611aa4366d
diff --git a/app/auth/login.tsx b/app/auth/login.tsx
index 0a8b4bb862..b4174e5b76 100644
--- a/app/auth/login.tsx
+++ b/app/auth/login.tsx
@@ -52,7 +52,10 @@ export const Login = ({ errorMessage }: { errorMessage: string }) => {
) : null}
<Flex gap="2" direction="column" align="center">
<Form action="/auth/github" method="post">
- <Button type="submit" disabled={!loaderData.githubEnabled}>
+ <Button
+ type="submit"
+ disabled={loaderData.isGithubEnabled === false}
+ >
<Flex gap="1">
<GithubIcon width="16" />
Login with GitHub
@@ -60,14 +63,17 @@ export const Login = ({ errorMessage }: { errorMessage: string }) => {
</Button>
</Form>
<Form action="/auth/google" method="post">
- <Button type="submit" disabled={!loaderData.googleEnabled}>
+ <Button
+ type="submit"
+ disabled={loaderData.isGoogleEnabled === false}
+ >
<Flex gap="1">
<GoogleIcon width="16" />
Login with Google
</Flex>
</Button>
</Form>
- {loaderData.devLogin && (
+ {loaderData.isDevLogin && (
<>
{isDevLogin ? (
<Form action="/auth/dev" method="post">
diff --git a/app/routes/login/index.tsx b/app/routes/login/index.tsx
index 101d8f860d..592b9a3691 100644
--- a/app/routes/login/index.tsx
+++ b/app/routes/login/index.tsx
@@ -16,10 +16,10 @@ export const loader: LoaderFunction = async ({ request }) => {
}
return {
- devLogin: process.env.DEV_LOGIN === "true",
+ isDevLogin: process.env.DEV_LOGIN === "true",
env,
- githubEnabled: process.env.GH_CLIENT_ID && process.env.GH_CLIENT_SECRET,
- googleEnabled:
+ isGithubEnabled: process.env.GH_CLIENT_ID && process.env.GH_CLIENT_SECRET,
+ isGoogleEnabled:
process.env.GOOGLE_CLIENT_ID && process.env.GOOGLE_CLIENT_SECRET,
};
};