diff --git a/blog/src/islands/Submit.tsx b/blog/src/islands/Submit.tsx
new file mode 100644
index 0000000..47932ca
--- /dev/null
+++ b/blog/src/islands/Submit.tsx
@@ -0,0 +1,20 @@
+type SubmitProps = {
+ eventString: string;
+ text: string;
+};
+
+export default function Submit({ eventString, text }: SubmitProps) {
+ function handleClick() {
+ window.dispatchEvent(new Event(`submit-${eventString}`));
+ }
+
+ return (
+
+ );
+}
diff --git a/blog/src/islands/auth.server.tsx b/blog/src/islands/auth.server.tsx
deleted file mode 100644
index eb2ed9c..0000000
--- a/blog/src/islands/auth.server.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import jwt from 'jsonwebtoken';
-
-const isTokenExpired = (token: string): boolean => {
- try {
- const { exp } = jwt.decode(token) as { exp: number };
- const expirationDatetimeInSeconds = exp * 1000;
- return Date.now() >= expirationDatetimeInSeconds;
- } catch {
- return true;
- }
-};
-
-export { isTokenExpired };
\ No newline at end of file
diff --git a/blog/src/layouts/Form.astro b/blog/src/layouts/Form.astro
index 478110b..522aa50 100644
--- a/blog/src/layouts/Form.astro
+++ b/blog/src/layouts/Form.astro
@@ -1,5 +1,6 @@
---
import NavBack from "../islands/NavBack";
+import Submit from "../islands/Submit";
import Main from "../layouts/Main.astro";
const { title, subtitle, text, buttonText, eventString } = Astro.props;
@@ -16,12 +17,7 @@ const { title, subtitle, text, buttonText, eventString } = Astro.props;