mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 08:50:51 +01:00
started hall of fame
This commit is contained in:
parent
ba63351b8a
commit
3fc8c856ef
@ -95,3 +95,4 @@
|
|||||||
|
|
||||||
@import './views/widgets/promo-article/PromoArticleWidgetView.scss';
|
@import './views/widgets/promo-article/PromoArticleWidgetView.scss';
|
||||||
@import './views/widgets/bonus-rare/BonusRareWidgetView.scss';
|
@import './views/widgets/bonus-rare/BonusRareWidgetView.scss';
|
||||||
|
@import './views/widgets/hall-of-fame/HallOfFameWidgetView.scss';
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
import { CommunityGoalHallOfFameData, CommunityGoalHallOfFameMessageEvent, GetCommunityGoalHallOfFameMessageComposer } from 'nitro-renderer';
|
import { CommunityGoalHallOfFameData, CommunityGoalHallOfFameMessageEvent, GetCommunityGoalHallOfFameMessageComposer } from 'nitro-renderer';
|
||||||
import { FC, useCallback, useEffect, useState } from 'react';
|
import { FC, useCallback, useEffect, useState } from 'react';
|
||||||
import { CreateMessageHook, SendMessageHook } from '../../../../../hooks/messages/message-event';
|
import { CreateMessageHook, SendMessageHook } from '../../../../../hooks/messages/message-event';
|
||||||
|
import { AvatarImageView } from '../../../../shared/avatar-image/AvatarImageView';
|
||||||
import { HallOfFameWidgetViewProps } from './HallOfFameWidgetView.types';
|
import { HallOfFameWidgetViewProps } from './HallOfFameWidgetView.types';
|
||||||
|
|
||||||
export const HallOfFameWidgetView: FC<HallOfFameWidgetViewProps> = props =>
|
export const HallOfFameWidgetView: FC<HallOfFameWidgetViewProps> = props =>
|
||||||
@ -20,11 +21,16 @@ export const HallOfFameWidgetView: FC<HallOfFameWidgetViewProps> = props =>
|
|||||||
|
|
||||||
CreateMessageHook(CommunityGoalHallOfFameMessageEvent, onCommunityGoalHallOfFameMessageEvent);
|
CreateMessageHook(CommunityGoalHallOfFameMessageEvent, onCommunityGoalHallOfFameMessageEvent);
|
||||||
|
|
||||||
if(!data) return null;
|
if (!data) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="hall-of-fame widget">
|
<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>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user