Icon rendering, done properly yay
This commit is contained in:
@@ -7,7 +7,7 @@ import { app } from '@tauri-apps/api'
|
|||||||
import { platform } from '@tauri-apps/plugin-os'
|
import { platform } from '@tauri-apps/plugin-os'
|
||||||
import { decrypt } from '../util/Encryption'
|
import { decrypt } from '../util/Encryption'
|
||||||
import { invoke } from '@tauri-apps/api/core'
|
import { invoke } from '@tauri-apps/api/core'
|
||||||
// import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import { LeaderboardResponse } from '../types/LeaderboardResponse'
|
import { LeaderboardResponse } from '../types/LeaderboardResponse'
|
||||||
|
|
||||||
export default function Leaderboards () {
|
export default function Leaderboards () {
|
||||||
@@ -84,13 +84,23 @@ export default function Leaderboards () {
|
|||||||
leaderboardData.entries.map((entry, i) => (
|
leaderboardData.entries.map((entry, i) => (
|
||||||
<div key={i} className='leaderboard-entry justify-between'>
|
<div key={i} className='leaderboard-entry justify-between'>
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
{/* <Image
|
<Image
|
||||||
src={}
|
src={
|
||||||
|
entry.customIcon == null
|
||||||
|
? `https://berrydash-api.lncvrt.xyz/icon?r=${entry.birdColor[0]}&g=${entry.birdColor[1]}&b=${entry.birdColor[2]}&id=${entry.icon}`
|
||||||
|
: `data:image/png;base64,${
|
||||||
|
leaderboardData.customIcons[entry.customIcon]
|
||||||
|
}`
|
||||||
|
}
|
||||||
width={28}
|
width={28}
|
||||||
height={28}
|
height={28}
|
||||||
alt=''
|
alt=''
|
||||||
className='scale-x-[-1] -ml-2'
|
className='scale-x-[-1] -ml-2'
|
||||||
/> */}
|
onError={e => {
|
||||||
|
;(e.currentTarget as HTMLImageElement).style.display =
|
||||||
|
'none'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<p>
|
<p>
|
||||||
{entry.username} (#{i + 1})
|
{entry.username} (#{i + 1})
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user