diff --git a/client/src/actions.jsx b/client/src/actions.jsx
index 59959393..ebec075d 100644
--- a/client/src/actions.jsx
+++ b/client/src/actions.jsx
@@ -41,6 +41,7 @@ export const setReclaiming = value => ({ type: 'SET_RECLAIMING', value });
export const setShowLog = value => ({ type: 'SET_SHOW_LOG', value });
export const setShop = value => ({ type: 'SET_SHOP', value });
export const setSubscription = value => ({ type: 'SET_SUBSCRIPTION', value });
+export const setPvp = value => ({ type: 'SET_PVP', value });
export const setTeam = value => ({ type: 'SET_TEAM', value: Array.from(value) });
export const setTeamPage = value => ({ type: 'SET_TEAM_PAGE', value });
diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx
index 2059f774..2c97b77f 100644
--- a/client/src/components/play.jsx
+++ b/client/src/components/play.jsx
@@ -14,6 +14,7 @@ const addState = connect(
account,
instances,
invite,
+ pvp,
} = state;
function sendInstanceState(id) {
@@ -32,15 +33,21 @@ const addState = connect(
ws.sendInstanceInvite();
}
+ function sendInstanceLeave() {
+ ws.sendInstanceLeave();
+ }
+
return {
account,
instances,
invite,
+ pvp,
sendInstanceState,
sendInstanceQueue,
sendInstancePractice,
sendInstanceInvite,
+ sendInstanceLeave,
};
},
@@ -67,11 +74,13 @@ function Play(args) {
account,
instances,
invite,
+ pvp,
sendInstanceState,
sendInstanceQueue,
sendInstancePractice,
sendInstanceInvite,
+ sendInstanceLeave,
setNav,
} = args;
@@ -125,6 +134,31 @@ function Play(args) {
);
};
+ const pvpBtn = () => {
+ if (pvp) return (
+
+
+ Finding Opponent
+
+ );
+
+ return (
+
+
+ Matchmaking
+
+ );
+ }
+
const subscription = account.subscribed
?