started hall of fame

This commit is contained in:
Dank074 2021-07-25 02:07:34 -05:00
parent ba63351b8a
commit 3fc8c856ef
3 changed files with 26 additions and 4 deletions

View File

@ -95,3 +95,4 @@
@import './views/widgets/promo-article/PromoArticleWidgetView.scss';
@import './views/widgets/bonus-rare/BonusRareWidgetView.scss';
@import './views/widgets/hall-of-fame/HallOfFameWidgetView.scss';

View File

@ -0,0 +1,15 @@
.hall-of-fame {
.hof-user-container {
display:inline-flex;
height: 100%;
.hof-tooltip {
position: absolute;
display: inline;
}
.avatar-image {
position:relative;
display:inline;
}
}
}

View File

@ -1,6 +1,7 @@
import { CommunityGoalHallOfFameData, CommunityGoalHallOfFameMessageEvent, GetCommunityGoalHallOfFameMessageComposer } from 'nitro-renderer';
import { FC, useCallback, useEffect, useState } from 'react';
import { CreateMessageHook, SendMessageHook } from '../../../../../hooks/messages/message-event';
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
import { HallOfFameWidgetViewProps } from './HallOfFameWidgetView.types';
export const HallOfFameWidgetView: FC<HallOfFameWidgetViewProps> = props =>
@ -19,12 +20,17 @@ export const HallOfFameWidgetView: FC<HallOfFameWidgetViewProps> = props =>
}, []);
CreateMessageHook(CommunityGoalHallOfFameMessageEvent, onCommunityGoalHallOfFameMessageEvent);
if(!data) return null;
if (!data) return null;
return (
<div className="hall-of-fame widget">
<h1>showing hall of fame for event: {data ? data.goalCode : 'empty'}</h1>
{data.hof && (data.hof.length > 0) && data.hof.map((entry, ind) =>
<div className="hof-user-container">
<div className="hof-tooltip">{entry.userName}</div>
<AvatarImageView figure={entry.figure} direction={2} key={ind} />
</div>
)}
</div>
);
}