dont ever buy api from the github bro
This commit is contained in:
parent
de77c0d6d8
commit
68e58c8d4e
3 changed files with 107 additions and 41 deletions
|
@ -21,7 +21,7 @@ export default function Reviews() {
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then((data: Review[]) => {
|
.then((data: Review[]) => {
|
||||||
const promises = data.map(review => (
|
const promises = data.map(review => (
|
||||||
fetch(`https://discordlookup.mesalytic.moe/v1/user/${review.discordID}`)
|
fetch(`https://dc-lookup.mono.exhq.dev/v1/user/${review.discordID}`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(user => ({
|
.then(user => ({
|
||||||
...review,
|
...review,
|
||||||
|
@ -66,16 +66,34 @@ export default function Reviews() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function SingleReview(props: NeoReview) {
|
export const theImager = async (id: string): Promise<string> => (await fetch(`https://dc-lookup.mono.exhq.dev/v1/user/${id}`)
|
||||||
return <div class="singlereview">
|
.then(res => res.json()).then(data => data.avatar.link).catch(() => "https://http.cat/status/100"));
|
||||||
<img src={`https://dp.nea.moe/avatar/${props.discordID}.png`} />
|
|
||||||
<div class="reviewinfo">
|
|
||||||
<div class="reviewname"> {props.global_name === null ? props.username : props.global_name} </div>
|
|
||||||
<div class="reviewtext"> {props.reviewText}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
function SingleReview(props: NeoReview) {
|
||||||
|
const [imageSrc, setImageSrc] = createSignal("");
|
||||||
|
|
||||||
|
// Assuming the user has a discordid or some identifier in props
|
||||||
|
onMount(async () => {
|
||||||
|
const url = await theImager(props.discordID); // Fetch the avatar image URL
|
||||||
|
setImageSrc(url); // Set the avatar image URL
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div class="singlereview">
|
||||||
|
<img
|
||||||
|
src={imageSrc()}
|
||||||
|
alt="User Avatar"
|
||||||
|
style={{ "max-width": "3em", "border-radius": "30%" }}
|
||||||
|
/>
|
||||||
|
<div class="reviewinfo">
|
||||||
|
<div class="reviewname">
|
||||||
|
{props.global_name === null ? props.username : props.global_name}
|
||||||
|
</div>
|
||||||
|
<div class="reviewtext">{props.reviewText}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
export async function sendReview(review: string, token: string): Promise<boolean> {
|
export async function sendReview(review: string, token: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`https://api.review.exhq.dev/sendreview?review=${review}`, {
|
const response = await fetch(`https://api.review.exhq.dev/sendreview?review=${review}`, {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { createSignal, onMount } from "solid-js";
|
||||||
|
import { theImager } from "./api"
|
||||||
import "./comps.css"
|
import "./comps.css"
|
||||||
// warning: this IS horrible code. its a joke. DO NOT try this at home because
|
// warning: this IS horrible code. its a joke. DO NOT try this at home because
|
||||||
// your local senior programmer CAN and WILL hunt you down
|
// your local senior programmer CAN and WILL hunt you down
|
||||||
|
@ -7,8 +9,25 @@ export function AdvancedBr({ count }: { count: number }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SingularOomfie({ url, discordid }: { name: string, url: string, discordid: string }) {
|
export function SingularOomfie({ url, discordid }: { name: string, url: string, discordid: string }) {
|
||||||
return <a href={url}><img class="tooltip" style={{
|
const [imageSrc, setImageSrc] = createSignal("");
|
||||||
"max-width": "3em",
|
|
||||||
"border-radius": "30%"
|
// Fetch the image URL when the component mounts
|
||||||
}} src={`https://dp.nea.moe/avatar/${discordid}.png`} alt="LMAO IMAGINE BEING BLIND" /> </a>
|
onMount(async () => {
|
||||||
|
const url = await theImager(discordid);
|
||||||
|
setImageSrc(url);
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<a href={imageSrc()}>
|
||||||
|
<img
|
||||||
|
class="tooltip"
|
||||||
|
style={{
|
||||||
|
"max-width": "3em",
|
||||||
|
"border-radius": "30%",
|
||||||
|
}}
|
||||||
|
src={imageSrc()}
|
||||||
|
alt="LMAO IMAGINE BEING BLIND"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
}
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
|
import { createSignal, onMount } from "solid-js";
|
||||||
import HoverComponent from "./name"
|
import HoverComponent from "./name"
|
||||||
import "./pfp.css"
|
import "./pfp.css"
|
||||||
|
import { theImager } from "./api";
|
||||||
|
|
||||||
function remov() {
|
function remov() {
|
||||||
for (let i = 0; i < document.styleSheets.length; i++) {
|
for (let i = 0; i < document.styleSheets.length; i++) {
|
||||||
|
@ -15,36 +17,63 @@ function remov() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Bdpfp() {
|
export function Bdpfp() {
|
||||||
return <div onmouseenter={remov} class='header bd' >
|
const [imageSrc, setImageSrc] = createSignal("");
|
||||||
<div class="birthdayparent">
|
|
||||||
<img class='birthdaypfp birthday' src="https://dp.nea.moe/avatar/712639419785412668.png" alt="LMAO IMAGINE BEING BLIND" />
|
|
||||||
<img class='birthdayhat birthday' src="./birthday.png" alt="" />
|
|
||||||
<HoverComponent />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
onMount(async () => {
|
||||||
|
const url = await theImager("712639419785412668");
|
||||||
|
setImageSrc(url);
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div onmouseenter={remov} class="header bd">
|
||||||
|
<div class="birthdayparent">
|
||||||
|
<img
|
||||||
|
class="birthdaypfp birthday"
|
||||||
|
src={imageSrc()}
|
||||||
|
alt="LMAO IMAGINE BEING BLIND"
|
||||||
|
/>
|
||||||
|
<img class="birthdayhat birthday" src="./birthday.png" alt="Birthday Hat" />
|
||||||
|
<HoverComponent />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Normalpfp() {
|
export function Normalpfp() {
|
||||||
return <div class="birthdayparent header normal">
|
const [imageSrc, setImageSrc] = createSignal("");
|
||||||
<img class="initialanim" src="https://dp.nea.moe/avatar/712639419785412668.png" alt="LMAO IMAGINE BEING BLIND" onMouseEnter={(e) => {
|
|
||||||
(e.target as HTMLImageElement).animate([
|
|
||||||
{ transform: "rotateZ(0deg)" },
|
|
||||||
{ transform: "rotateZ(360deg)" },
|
|
||||||
], {
|
|
||||||
duration: 400,
|
|
||||||
iterations: 1,
|
|
||||||
})
|
|
||||||
}} onClick={(e) => {
|
|
||||||
(e.target as HTMLImageElement).animate([
|
|
||||||
{ transform: "rotateY(0deg)" },
|
|
||||||
{ transform: "rotateY(360deg)" },
|
|
||||||
], {
|
|
||||||
duration: 150,
|
|
||||||
iterations: 1,
|
|
||||||
})
|
|
||||||
}} />
|
|
||||||
<HoverComponent />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
onMount(async () => {
|
||||||
|
const url = await theImager("712639419785412668");
|
||||||
|
setImageSrc(url);
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div class="birthdayparent header normal">
|
||||||
|
<img
|
||||||
|
class="initialanim"
|
||||||
|
src={imageSrc()}
|
||||||
|
alt="LMAO IMAGINE BEING BLIND"
|
||||||
|
onMouseEnter={(e) => {
|
||||||
|
(e.target as HTMLImageElement).animate([
|
||||||
|
{ transform: "rotateZ(0deg)" },
|
||||||
|
{ transform: "rotateZ(360deg)" },
|
||||||
|
], {
|
||||||
|
duration: 400,
|
||||||
|
iterations: 1,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
onClick={(e) => {
|
||||||
|
(e.target as HTMLImageElement).animate([
|
||||||
|
{ transform: "rotateY(0deg)" },
|
||||||
|
{ transform: "rotateY(360deg)" },
|
||||||
|
], {
|
||||||
|
duration: 150,
|
||||||
|
iterations: 1,
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<HoverComponent />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
Loading…
Reference in a new issue