From 8e4163e3f08e29f38fe87c59d8cfb91e0fa98063 Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 29 Aug 2022 19:01:20 +0300 Subject: everything works --- src/components/Form.astro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/components/Form.astro') diff --git a/src/components/Form.astro b/src/components/Form.astro index 417b569..540a4d4 100644 --- a/src/components/Form.astro +++ b/src/components/Form.astro @@ -1,7 +1,11 @@ --- -import '../styles/blackbox.css'; import { sha256 } from 'js-sha256'; +export interface Props { + board: string; + tid?: string +} + const { board, tid } = Astro.props; const iphash = sha256(Astro.clientAddress); --- @@ -31,6 +35,7 @@ const iphash = sha256(Astro.clientAddress); if(r.status == 200) { alert('Thread Successfuly Posted'); let id = await r.text(); + if(id == 'close') window.top.close(); window.location.assign(`/board/${board}/${id}`); } else alert('An Error has Accured'); -- cgit v1.2.3