review (solid version) (pun intented)

This commit is contained in:
amy 2024-08-04 09:46:51 +03:30
parent 56fa987021
commit 4adf257cbf
7 changed files with 153 additions and 5 deletions

View file

@ -85,7 +85,7 @@ function App() {
<img onClick={() => {
setanimatedwoem(true)
setTimeout(() => {
window.location.href = "https://woem.men/@exhq"
window.location.href = "https://woem.men/@echo"
}, 200);
}} classList={{ 'woemimg': true, 'animate': animatedwoem() }} src="https://woem.men/files/356134d8-df3b-41dc-ac73-c4420442bf3a" alt="LMAO IMAGINE BEING BLIND" />
</div>

View file

@ -43,8 +43,8 @@ export default function Reviews() {
return (
<>
<a style={{
display: ishover() ? "inline" : "none"
}} href="https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=token&redirect_uri=https%3A%2F%2Freview.exhq.dev%2F&scope=identify">
display: ishover() ? "inline" : "none"
}} href="https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=token&redirect_uri=https%3A%2F%2Fexhq.dev%2Freview%2F&scope=identify">
<p>add your reviews here</p>
</a>
<h1 class="reviewheadertext">Reviews</h1>
@ -74,4 +74,23 @@ function SingleReview(props: NeoReview) {
<div class="reviewtext"> {props.reviewText}</div>
</div>
</div>
}
}
export async function sendReview(review: string, token: string): Promise<boolean> {
try {
const response = await fetch(`https://api.review.exhq.dev/sendreview?review=${review}`, {
headers: {
"Auth": token,
},
method: "POST"
});
if (response.status !== 200) {
return false;
}
return true;
} catch (error) {
return false;
}
}