diff --git a/src/components/api.tsx b/src/components/api.tsx
index 82d0f61..beeb473 100644
--- a/src/components/api.tsx
+++ b/src/components/api.tsx
@@ -21,7 +21,7 @@ export default function Reviews() {
.then(response => response.json())
.then((data: 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(user => ({
...review,
@@ -66,16 +66,34 @@ export default function Reviews() {
}
-function SingleReview(props: NeoReview) {
- return
-
-
-
{props.global_name === null ? props.username : props.global_name}
-
{props.reviewText}
-
-
-}
+export const theImager = async (id: string): Promise => (await fetch(`https://dc-lookup.mono.exhq.dev/v1/user/${id}`)
+ .then(res => res.json()).then(data => data.avatar.link).catch(() => "https://http.cat/status/100"));
+ 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 (
+
+
+
+
+ {props.global_name === null ? props.username : props.global_name}
+
+
{props.reviewText}
+
+
+ );
+ }
export async function sendReview(review: string, token: string): Promise {
try {
const response = await fetch(`https://api.review.exhq.dev/sendreview?review=${review}`, {
diff --git a/src/components/comps.tsx b/src/components/comps.tsx
index 131d764..2c8ad51 100644
--- a/src/components/comps.tsx
+++ b/src/components/comps.tsx
@@ -1,3 +1,5 @@
+import { createSignal, onMount } from "solid-js";
+import { theImager } from "./api"
import "./comps.css"
// 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
@@ -7,8 +9,25 @@ export function AdvancedBr({ count }: { count: number }) {
}
export function SingularOomfie({ url, discordid }: { name: string, url: string, discordid: string }) {
- return
+ const [imageSrc, setImageSrc] = createSignal("");
+
+ // Fetch the image URL when the component mounts
+ onMount(async () => {
+ const url = await theImager(discordid);
+ setImageSrc(url);
+ });
+
+ return (
+
+
+
+ );
}
\ No newline at end of file
diff --git a/src/components/pfp.tsx b/src/components/pfp.tsx
index a1b084d..78d947e 100644
--- a/src/components/pfp.tsx
+++ b/src/components/pfp.tsx
@@ -1,5 +1,7 @@
+import { createSignal, onMount } from "solid-js";
import HoverComponent from "./name"
import "./pfp.css"
+import { theImager } from "./api";
function remov() {
for (let i = 0; i < document.styleSheets.length; i++) {
@@ -15,36 +17,63 @@ function remov() {
}
export function Bdpfp() {
- return
+ const [imageSrc, setImageSrc] = createSignal("");
+ onMount(async () => {
+ const url = await theImager("712639419785412668");
+ setImageSrc(url);
+ });
+
+ return (
+
+ );
}
export function Normalpfp() {
- return
+ const [imageSrc, setImageSrc] = createSignal("");
+
+ onMount(async () => {
+ const url = await theImager("712639419785412668");
+ setImageSrc(url);
+ });
+
+ return (
+
+ );
}
\ No newline at end of file