Skip to content

Commit

Permalink
fix: cloudflare pages adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Dec 28, 2024
1 parent c9ff8d6 commit f75fc45
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions CommitConventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
id: commit-conventions
title: Commit Conventions
---

This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) loosely as the specification
for our commits.

Expand Down
5 changes: 5 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ export default defineConfig({
],

adapter: cloudflare(),
vite: {
ssr: {
external: ['node:buffer', 'node:fetch'],
},
},
});
Binary file modified bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/cloudflare": "^12.1.0",
"@astrojs/react": "^4.1.2",
"@astrojs/tailwind": "^5.1.4",
Expand All @@ -30,7 +31,8 @@
"sonner": "^1.7.1",
"tailwind-merge": "^2.6.0",
"tailwindcss": "^3.4.17",
"tailwindcss-animate": "^1.0.7"
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.2"
},
"devDependencies": {
"@types/bun": "^1.1.14",
Expand Down
16 changes: 8 additions & 8 deletions src/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export const server = {
}),
};

const r = await fetch('https://api.brevo.com/v3/contacts', options);
// const r = await fetch('https://api.brevo.com/v3/contacts', options);

if (!r.ok) {
console.error(r);
throw new ActionError({
message: 'Something went wrong while adding you to the waitlist 😢',
statusCode: 500,
});
}
// if (!r.ok) {
// console.error(r);
// throw new ActionError({
// message: 'Something went wrong while adding you to the waitlist 😢',
// statusCode: 500,
// });
// }
return email;
},
}),
Expand Down
4 changes: 0 additions & 4 deletions src/components/index/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
import astroLogo from '../../assets/astro.svg';
import background from '../../assets/background.svg';
import logo from '../../assets/light_full_logo.svg';
import cloud from '../../assets/cloud.svg';
import mascot from "../../assets/mascot.png";
import PulsatingButton from "@/components/ui/pulsating-button";
import {Button} from "../ui/button"
import {Input} from "../ui/input"
import Waitlist from "./Waitlist.astro";
---

Expand Down

0 comments on commit f75fc45

Please sign in to comment.