X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fresults%2FItem.js;h=4b243b34bc4a9a673a55c233d4c4c62481745851;hb=35d1ce20e64f3373d74816ed1bf9440b4213fa1a;hp=a2ee8e392b82a392b76236b8bab92e4e7806d6f7;hpb=8d97d023740e438361e659c6e133418e33343178;p=alttp.git diff --git a/resources/js/components/results/Item.js b/resources/js/components/results/Item.js index a2ee8e3..4b243b3 100644 --- a/resources/js/components/results/Item.js +++ b/resources/js/components/results/Item.js @@ -5,8 +5,8 @@ import { Button } from 'react-bootstrap'; import DetailDialog from './DetailDialog'; import Box from '../users/Box'; import { getIcon, getTime } from '../../helpers/Result'; -import { findResult } from '../../helpers/Participant'; import { maySeeResults } from '../../helpers/permissions'; +import { findResult } from '../../helpers/User'; import { withUser } from '../../helpers/UserContext'; const getClassName = result => { @@ -23,16 +23,16 @@ const getClassName = result => { }; const Item = ({ - participant, + authUser, round, tournament, user, }) => { const [showDialog, setShowDialog] = useState(false); - const result = findResult(participant, round); - const maySee = maySeeResults(user, tournament, round); + const result = findResult(user, round); + const maySee = maySeeResults(authUser, tournament, round); return
- + setShowDialog(false)} - participant={participant} round={round} show={showDialog} tournament={tournament} + user={user} />
; }; Item.propTypes = { - participant: PropTypes.shape({ - user: PropTypes.shape({ - }), + authUser: PropTypes.shape({ }), round: PropTypes.shape({ }), @@ -66,4 +64,4 @@ Item.propTypes = { }), }; -export default withUser(Item); +export default withUser(Item, 'authUser');