Skip to content

Commit

Permalink
chore: Update deploy-button and sql-editor components
Browse files Browse the repository at this point in the history
  • Loading branch information
m-abdelwahab committed Jun 11, 2024
1 parent 9c541ba commit 0cf5700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 4 additions & 3 deletions apps/web/app/components/deploy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import { useState } from "react";
import { cn } from "~/lib/cn";
import type { clientAction } from "~/routes/actions.deploy";

const CLOUDFLARE_TURNSTILE_SITE_KEY = import.meta.env
.VITE_CLOUDFLARE_TURNSTILE_SITE_KEY;

export const DeployButton = () => {
const CLOUDFLARE_TURNSTILE_SITE_KEY = import.meta.env
.VITE_CLOUDFLARE_TURNSTILE_SITE_KEY;
const [token, setToken] = useState<null | string>(null);

const fetcher = useFetcher<typeof clientAction>({ key: "deploy" });
const isLoading = fetcher.state !== "idle";
const hasCreatedProject = fetcher?.data?.result?.hasCreatedProject ?? false;

console.log(CLOUDFLARE_TURNSTILE_SITE_KEY);
return (
<fetcher.Form
method="POST"
Expand Down
4 changes: 0 additions & 4 deletions apps/web/app/components/sql-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export const SqlEditor = () => {

const queryFetcher = useFetcher<typeof queryAction>({ key: "query" });
const isLoading = queryFetcher.state !== "idle";
const results = queryFetcher.data?.result;
console.log({
results,
});
const deployFetcher = useFetcher<typeof deployAction>({ key: "deploy" });
const hasCreatedProject =
deployFetcher?.data?.result?.hasCreatedProject ?? false;
Expand Down

0 comments on commit 0cf5700

Please sign in to comment.