yay
This commit is contained in:
parent
add75dced1
commit
2310ba837a
1 changed files with 98 additions and 99 deletions
|
|
@ -2,10 +2,9 @@ import { createSignal, onMount } from "solid-js";
|
|||
import {ishover} from "../App";
|
||||
|
||||
interface Review {
|
||||
reviewID: number;
|
||||
discordID: string;
|
||||
reviewText: string;
|
||||
timestamp: string;
|
||||
id: number;
|
||||
reviewer: string;
|
||||
review: string;
|
||||
}
|
||||
|
||||
interface NeoReview extends Review {
|
||||
|
|
@ -20,7 +19,7 @@ export default function Reviews() {
|
|||
.then((response) => response.json())
|
||||
.then((data: Review[]) => {
|
||||
const promises = data.map((review) =>
|
||||
fetch(`https://discord-info.api.amy.rip/v1/user/${review.discordID}`)
|
||||
fetch(`https://discord-info.api.amy.rip/v1/user/${review.reviewer}`)
|
||||
.then((response) => response.json())
|
||||
.then((user) => ({
|
||||
...review,
|
||||
|
|
@ -79,7 +78,7 @@ function SingleReview(props: NeoReview) {
|
|||
const [imageSrc, setImageSrc] = createSignal("");
|
||||
|
||||
onMount(async () => {
|
||||
const url = await theImager(props.discordID);
|
||||
const url = await theImager(String(props.reviewer));
|
||||
setImageSrc(url);
|
||||
});
|
||||
|
||||
|
|
@ -94,7 +93,7 @@ function SingleReview(props: NeoReview) {
|
|||
<div class="reviewname">
|
||||
{props.global_name === null ? props.username : props.global_name}
|
||||
</div>
|
||||
<div class="reviewtext">{props.reviewText}</div>
|
||||
<div class="reviewtext">{props.review}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue