2021-04-25 01:57:01 -05:00
import BasicPage from "../../components/basic-page-template" ;
2021-04-18 23:14:21 -05:00
import WCard from "../../components/werefox-card" ;
import TCard from "../../components/testimonial-card" ;
import axios from "axios" ;
// Async functions to grab user avatars server-side
export const getIcon = async ( { json , name } ) =>
await axios . get ( json ) . then (
( { data } ) => [ name , data [ "icon" ] [ "url" ] ] ,
( error ) => {
2021-04-25 01:57:01 -05:00
console . log ( error ) ;
2021-04-18 23:14:21 -05:00
return [ name , null ] ;
}
) ;
export const getStaticProps = async ( ) => {
const promises = Object . entries ( USERS ) . map ( ( [ name , { json } ] ) =>
getIcon ( { name , json } )
) ;
const iconUrls = await Promise . all ( promises ) ;
return {
props : {
iconUrls : iconUrls . reduce (
( acc , [ name , url ] ) => ( { ... acc , [ name ] : url } ) ,
{ }
) ,
} ,
} ;
} ;
// This is where you put the testimonial users' info
const USERS = {
colabunny : {
json : "https://yiff.life/@colabunny.json" ,
url : "https://yiff.life/@colabunny" ,
content : '"please stay your jokes are funny and smart"' ,
} ,
ElfLord : {
url : "https://freedom.horse/@ElfLord" ,
json : "https://freedom.horse/@ElfLord.json" ,
content : ` "Someday I'm gonna visit you in Texas, and when I get there, I'm going to realize you don't live in Texas at all, and I'm in the wrong state" ` ,
} ,
Decimal : {
url : "https://plush.city/@Decimal" ,
json : "https://plush.city/@Decimal.json" ,
2021-04-25 01:57:01 -05:00
content : ` "I will appreciate the heck out of you any day" ` ,
2021-04-18 23:14:21 -05:00
} ,
skelly : {
url : "https://redroo.ml/@skelly" ,
json : "https://redroo.ml/@skelly.json" ,
2021-04-25 01:57:01 -05:00
content : ` "this an an official invitation for any one of you to put 'fuck you i dont give testimonials' as a testimonial by me on your profile" ` ,
2021-04-18 23:14:21 -05:00
} ,
Drako _Fenris : {
url : "https://yiff.life/@Drako_Fenris" ,
json : "https://yiff.life/@Drako_Fenris.json" ,
2021-04-25 01:57:01 -05:00
content : ` "[Alexis' future wife] lives in the ether yet to be revealed. she awaits the day her big tiddie goth gf rides in on her unicorn and rescues her." ` ,
2021-04-18 23:14:21 -05:00
} ,
"00dani" : {
url : "https://vulpine.club/@00dani" ,
json : "https://vulpine.club/@00dani.json" ,
2021-04-25 01:57:01 -05:00
content : ` "*falls in love with you* haha whoopsies 😳" ` ,
2021-04-18 23:14:21 -05:00
} ,
Gumby : {
url : "https://puppy.cafe/@Gumby" ,
json : "https://puppy.cafe/@Gumby.json" ,
2021-04-25 01:57:01 -05:00
content : ` "im love alexis a lot 💚 🐀" ` ,
2021-04-18 23:14:21 -05:00
} ,
AshBunny : {
url : "https://vulpine.club/@AshBunny" ,
json : "https://vulpine.club/@AshBunny.json" ,
2021-04-25 01:57:01 -05:00
content : ` "heck. I don't think I can take all of this support." ` ,
2021-04-18 23:14:21 -05:00
} ,
heatherhorns : {
url : "https://plush.city/@heatherhorns" ,
json : "https://plush.city/@heatherhorns.json" ,
content : ` ";~;
2021-04-25 01:57:01 -05:00
gpsd gosh " ` ,
} ,
MutoShack : {
url : "https://functional.cafe/@MutoShack" ,
json : "https://functional.cafe/@MutoShack.json" ,
content : ` "yess w'all say nice things! usually "alexis is the good" and "alexis is the gay"
because it is the truth " ` ,
} ,
immychan : {
url : "https://antabaka.me/@immychan" ,
json : "https://antabaka.me/@immychan.json" ,
content : ` "Oh damn you're cute 😳" ` ,
} ,
nautilee : {
url : "https://dragon.style/@nautilee" ,
json : "https://dragon.style/@nautilee.json" ,
content : ` "...how are you so goshdarn cute" ` ,
2021-04-18 23:14:21 -05:00
} ,
lindsays : {
url : "https://hackers.town/@lindsays" ,
json : "https://hackers.town/@lindsays.json" ,
2021-04-25 01:57:01 -05:00
content : ` "Regarding @shadow8t4 : She's an amazing, sweet, beautiful dork, and a spectacular best friend. also, a butt." ` ,
2021-04-18 23:14:21 -05:00
} ,
} ;
export default function Testimonials ( { iconUrls } ) {
return (
2021-04-25 01:57:01 -05:00
< BasicPage page _title = "Werefox Testimonials" card _title = "Testimonials!" >
< WCard >
< p className = "p-6 text-lg text-center text-werefox-blue-dark dark:text-werefox-blue" >
Sometimes , people say some nice things about me . Here are some
examples !
< / p >
< / W C a r d >
{ Object . keys ( USERS ) . map ( ( user ) => (
< TCard
key = { USERS [ user ] . url }
src = { iconUrls [ user ] }
alt = { ` ${ user } 's Avatar ` }
url = { USERS [ user ] . url }
user = { user }
innerText = { USERS [ user ] . content }
2021-04-18 23:14:21 -05:00
/ >
2021-04-25 01:57:01 -05:00
) ) }
< / B a s i c P a g e >
2021-04-18 23:14:21 -05:00
) ;
}