diff --git a/components/ui/ImpactCalculator.tsx b/components/ui/ImpactCalculator.tsx index 9f198884..d763a6c3 100644 --- a/components/ui/ImpactCalculator.tsx +++ b/components/ui/ImpactCalculator.tsx @@ -75,7 +75,6 @@ export default function ImpactCalculator({ }; const handleSubmit = (e: JSX.TargetedEvent) => { - // @ts-expect-error: preventDefault is not a function e.preventDefault(); loading.value = true; diff --git a/deno.json b/deno.json index 972258ba..cf3a6fdf 100644 --- a/deno.json +++ b/deno.json @@ -33,7 +33,7 @@ "@std/testing": "jsr:@std/testing@^1.0.0", "@supabase/supabase-js": "jsr:@supabase/supabase-js@^2.45.4", "@zaubrik/djwt": "jsr:@zaubrik/djwt@^3.0.2", - "apps/": "https://denopkg.com/deco-cx/apps@0.62.5/", + "apps/": "https://denopkg.com/deco-cx/apps@0.62.9/", "daisyui": "npm:daisyui@4.6.0", "deco-sites/std/": "https://denopkg.com/deco-sites/std@1.26.8/", "deco/": "https://denopkg.com/deco-cx/deco@1.106.2/", diff --git a/docs/self-host/envs/pt.md b/docs/self-host/envs/pt.md index 983d7978..b77801e3 100644 --- a/docs/self-host/envs/pt.md +++ b/docs/self-host/envs/pt.md @@ -3,39 +3,4 @@ description: Arquitetura Self-host since: 2.0 --- -## Deployando seu site (Docker) - -```dockerfile -FROM denoland/deno:alpine - -# The port that your application listens to. -EXPOSE 8000 - -WORKDIR /app - -RUN mkdir -p /home/deno && chown -R deno:deno /home/deno && mkdir /app/deno && chown -R deno:deno /app && mkdir -p /deno-dir && chown -R deno:deno /deno-dir - -# Prefer not to run as root. -USER deno - -# These steps will be re-run upon each file change in your working directory: -COPY --chown=deno:deno . deco - -WORKDIR /app/deco - -RUN echo -e 'import "$fresh/src/build/deps.ts";\nimport "$fresh/src/runtime/entrypoints/main.ts";\nimport "$fresh/src/runtime/entrypoints/deserializer.ts";\nimport "$fresh/src/runtime/entrypoints/signals.ts";' >> _docker_deps.ts - -RUN deno cache --allow-import --frozen main.ts dev.ts _docker_deps.ts - -ARG GIT_REVISION=1 - -ENV DECO_SITE_NAME=selfhostmgr - -ENV DENO_DEPLOYMENT_ID=$GIT_REVISION - -CMD ["run", "--cached-only", "-A", "--unstable-kv", "main.ts"] -``` - -Para deployar no fly.io... - -`flyctl lauch` +## TODO (WIP) diff --git a/docs/self-host/site/pt.md b/docs/self-host/site/pt.md index 983d7978..8d780638 100644 --- a/docs/self-host/site/pt.md +++ b/docs/self-host/site/pt.md @@ -3,6 +3,8 @@ description: Arquitetura Self-host since: 2.0 --- +## TODO (WIP) + ## Deployando seu site (Docker) ```dockerfile @@ -29,7 +31,7 @@ RUN deno cache --allow-import --frozen main.ts dev.ts _docker_deps.ts ARG GIT_REVISION=1 -ENV DECO_SITE_NAME=selfhostmgr +ENV DECO_SITE_NAME=yoursitename ENV DENO_DEPLOYMENT_ID=$GIT_REVISION @@ -38,4 +40,4 @@ CMD ["run", "--cached-only", "-A", "--unstable-kv", "main.ts"] Para deployar no fly.io... -`flyctl lauch` +`flyctl launch` diff --git a/islands/tuju/Form.tsx b/islands/tuju/Form.tsx index e8fbfa1f..71b14a6f 100644 --- a/islands/tuju/Form.tsx +++ b/islands/tuju/Form.tsx @@ -82,7 +82,8 @@ export default function Form({ alert("Erro ao enviar. Por favor, envie o fomulário novamente"); } } catch (error) { - console.log(error.message); + const errorObj = error as { message?: string }; + console.log(errorObj.message ? errorObj.message : error); alert("Erro inesperado. Por favor, envie o fomulário novamente"); } diff --git a/routes/api/calc.tsx b/routes/api/calc.tsx index a7237b78..bb372200 100644 --- a/routes/api/calc.tsx +++ b/routes/api/calc.tsx @@ -6,8 +6,7 @@ export const handler: Handlers = { POST: async (req) => { const formData = Object.fromEntries((await req.formData()).entries()); const recaptchaToken = formData["g-recaptcha-response"]; - const isCaptchaValid = !!recaptchaToken ?? - (await verifyCaptcha(recaptchaToken.toString())); + const isCaptchaValid = await verifyCaptcha(recaptchaToken.toString()); if (!ZAPIER_WEBHOOK || !isCaptchaValid) { return new Response(null, { headers: { diff --git a/sections/Live Projects/LiveProjects.tsx b/sections/Live Projects/LiveProjects.tsx index 4fba007b..e6269932 100644 --- a/sections/Live Projects/LiveProjects.tsx +++ b/sections/Live Projects/LiveProjects.tsx @@ -192,7 +192,6 @@ function TemplatesGrid(props: Props) { className="p-2 cursor-pointer w-full bg-[#000D0D] rounded-lg lg:hidden" value={categoriaSelecionada} onChange={(e) => { - // @ts-expect-error: e.target does not exists const selectedValue = (e.target as HTMLSelectElement).value; handleChangeCategoria(selectedValue); }}