22
33import { FaDiscord } from 'react-icons/fa'
44
5+ import Holoverlay , { HoloEffect } from './Holoverlay'
56import { GlobeIcon } from 'lucide-react'
67import Image from 'next/image'
78
89import { Card } from '@/components/Card'
9- import styles from '@/components/PlayerCard/holo.module.css'
1010
1111import { usePublicProfile } from '@/hooks/useProfiles'
1212import {
@@ -65,6 +65,8 @@ export default function PlayerCard({
6565 showStatBoxes = false ,
6666 asCelestialCard = false ,
6767 overrideCelestialCard = null ,
68+ holoEffect = 'dice' ,
69+ pictureEffect = null ,
6870} : {
6971 userId : string | null
7072 tiltFactor ?: number
@@ -74,6 +76,8 @@ export default function PlayerCard({
7476 showStatBoxes ?: boolean
7577 asCelestialCard ?: boolean
7678 overrideCelestialCard ?: DbCelestialCard | null
79+ holoEffect ?: HoloEffect | null
80+ pictureEffect ?: HoloEffect | null
7781} ) {
7882 const scale = width / CARD_WIDTH
7983 const isTiny = tiny || width < 200
@@ -177,10 +181,7 @@ export default function PlayerCard({
177181 aspectRatio : CARD_WIDTH / CARD_HEIGHT ,
178182 } }
179183 >
180- < div
181- id = "holo"
182- className = { `z-4 ${ styles . shine } ${ styles . dice } absolute inset-0 z-3 size-full opacity-[.3] transition-opacity duration-300 hover:opacity-100` }
183- />
184+ { holoEffect && < Holoverlay effect = { holoEffect } /> }
184185 { /* Background card image */ }
185186 < Image
186187 src = { washImageSrcs [ profile . team || 'unassigned' ] }
@@ -374,14 +375,22 @@ export default function PlayerCard({
374375 ) }
375376 < div className = "relative size-full" >
376377 { profile . profile_pictures_url && (
377- < Image
378- id = "player-picture"
379- src = { profile . profile_pictures_url }
380- alt = "Profile picture"
381- fill
382- style = { { borderRadius : 12 * scale } }
383- className = "z-2 object-cover"
384- />
378+ < >
379+ < Image
380+ id = "player-picture"
381+ src = { profile . profile_pictures_url }
382+ alt = "Profile picture"
383+ fill
384+ style = { { borderRadius : 12 * scale } }
385+ className = "z-2 object-cover"
386+ />
387+ { pictureEffect && (
388+ < Holoverlay
389+ effect = { pictureEffect }
390+ className = "opacity-10 hover:opacity-10"
391+ />
392+ ) }
393+ </ >
385394 ) }
386395 { asCelestialCard && (
387396 < div
0 commit comments