1
0
Fork 0

bruh
All checks were successful
Build / Build (push) Successful in 48s
Build / Deploy (push) Successful in 24s

This commit is contained in:
amy 2024-12-24 22:25:44 +03:30
parent 85e70157ad
commit 0e0005e8b7
No known key found for this signature in database

View file

@ -1,51 +1,68 @@
import '../src/App.css' import "../src/App.css";
import "./reviewed.css" import "./reviewed.css";
import { sendReview } from '../src/components/api' import { sendReview } from "../src/components/api";
export default function App() { export default function App() {
const token = window.location.hash.substring(window.location.hash.indexOf("access_token") + "access_token".length + 1).substring(0, 30) const token = window.location.hash
console.log(token) .substring(
if (token === "") { window.location.hash.indexOf("access_token") + "access_token".length + 1,
window.location.href = "https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=token&redirect_uri=https%3A%2F%2Fexhq.dev%2Freview%2F&scope=identify" )
} .substring(0, 30);
let ref!: HTMLTextAreaElement; console.log(token);
return <div class='reviewOuterparent'> if (token === "") {
<div class='reviewParent'> window.location.href =
<img src="../fjonkie.png" alt="" /> "https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=code&redirect_uri=https%3A%2F%2Famy.rip%2Freview%2F&scope=identify";
<span>(it doesnt)</span> }
<textarea let ref!: HTMLTextAreaElement;
ref={ref} return (
onKeyPress={async (e) => { <div class="reviewOuterparent">
if (e.key === "Enter") { <div class="reviewParent">
e.preventDefault() <img src="../fjonkie.png" alt="" />
if (await sendReview(ref.value, token)) { <span>(it doesnt)</span>
alert("review sent!") <textarea
} else { ref={ref}
alert("something went wrong, check your network tab or something idfk") onKeyPress={async (e) => {
} if (e.key === "Enter") {
} e.preventDefault();
}} if (await sendReview(ref.value, token)) {
placeholder='your shitty review' alert("review sent!");
class='reviewText' } else {
name="" id="" cols="25" rows="3"> alert(
</textarea> "something went wrong, check your network tab or something idfk",
);
}
}
}}
placeholder="your shitty review"
class="reviewText"
name=""
id=""
cols="25"
rows="3"
></textarea>
<div class='flexButton'> <div class="flexButton">
<button onclick={async () => { <button
try { onclick={async () => {
const success = await sendReview(ref.value, token); try {
if (success) { const success = await sendReview(ref.value, token);
alert("Review sent successfully!"); if (success) {
} else { alert("Review sent successfully!");
alert("Failed to send review. open your browser's network tab for more info lmao"); } else {
} alert(
} catch (error) { "Failed to send review. open your browser's network tab for more info lmao",
alert("how"); );
} }
} catch (error) {
}} class='sendButton'>send yo shi</button> alert("how");
</div> }
}}
class="sendButton"
>
send yo shi
</button>
</div> </div>
</div>
</div> </div>
);
} }