]> git.localhorst.tv Git - alttp.git/commitdiff
hide apply button for non-users
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 9 Apr 2022 19:17:54 +0000 (21:17 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 9 Apr 2022 19:17:54 +0000 (21:17 +0200)
resources/js/components/tournament/ApplyButton.js

index 601eb938e5f46d4e525da90737599e9c935ebc80..a6bde2f7ac5e622e4321d6056c83f0f4802aab9d 100644 (file)
@@ -30,7 +30,7 @@ const getTitle = (user, tournament) => {
 };
 
 const ApplyButton = ({ tournament, user }) => {
-       if (!tournament.accept_applications || isRunner(user, tournament)) return null;
+       if (!user || !tournament.accept_applications || isRunner(user, tournament)) return null;
 
        return <span className="d-inline-block" title={getTitle(user, tournament)}>
                <Button