i miss otachan
This commit is contained in:
parent
21ffad6026
commit
fa8f60dcdd
7 changed files with 375 additions and 277 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { createSignal, onMount } from "solid-js"
|
||||
import { ishover } from "../App";
|
||||
import {createSignal, onMount} from "solid-js"
|
||||
import {ishover} from "../App";
|
||||
|
||||
interface Review {
|
||||
reviewID: number;
|
||||
|
|
@ -44,8 +44,9 @@ export default function Reviews() {
|
|||
<>
|
||||
<a style={{
|
||||
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>
|
||||
}}
|
||||
href="https://discord.com/oauth2/authorize?client_id=1208380910525743134&response_type=token&redirect_uri=https%3A%2F%2Fexhq.dev%2Freview%2F&scope=identify">
|
||||
<p class="fadein">add your reviews here</p>
|
||||
</a>
|
||||
<h1 class="reviewheadertext">Reviews</h1>
|
||||
<div
|
||||
|
|
@ -69,30 +70,31 @@ export default function Reviews() {
|
|||
export const theImager = async (id: string): Promise<string> => (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("");
|
||||
|
||||
onMount(async () => {
|
||||
const url = await theImager(props.discordID);
|
||||
setImageSrc(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>
|
||||
function SingleReview(props: NeoReview) {
|
||||
const [imageSrc, setImageSrc] = createSignal("");
|
||||
|
||||
onMount(async () => {
|
||||
const url = await theImager(props.discordID);
|
||||
setImageSrc(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> {
|
||||
try {
|
||||
const response = await fetch(`https://backendreview.mono.exhq.dev/sendreview?review=${review}`, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue