diff --git a/src/pages/Missions/Missions.css b/src/pages/Missions/Missions.css index 9556d34..ce0f920 100644 --- a/src/pages/Missions/Missions.css +++ b/src/pages/Missions/Missions.css @@ -1,3 +1,60 @@ -.mission { - display: flex; +table { + width: 92%; + margin: 5% auto; + border-collapse: collapse; +} + +td { + text-align: start; + border: 1px solid #858484; + padding: 8px; +} + +td:first-child { + font-weight: bold; +} + +th { + font-weight: bold; + border: 1px solid #858484; + padding: 8px; + text-align: start; +} + +tr:nth-child(even) { + background-color: #f0f0f0; +} + +td p { + padding: 8px; + border-radius: 4px; + width: max-content; + text-align: center; + color: white; + cursor: pointer; +} + +td p.active { + background-color: #419bf9; +} + +td p.not-member { + background-color: #6d757d; +} + +button { + padding: 8px 16px; + border: 1px solid #ccc; + border-radius: 4px; + cursor: pointer; +} + +button.leave { + color: red; + border: 1px solid red; +} + +button.join { + color: red; + border: 1px solid red; } diff --git a/src/pages/Missions/Missions.js b/src/pages/Missions/Missions.js index b975ea9..a063f61 100644 --- a/src/pages/Missions/Missions.js +++ b/src/pages/Missions/Missions.js @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { fetchMissionAsync } from '../../redux/missionSlice'; +import { fetchMissionAsync, joiningMission } from '../../redux/missionSlice'; import './Missions.css'; function Missions() { @@ -25,9 +25,48 @@ function Missions() { ); } - console.log('=======', missions); return ( - <>> +
Mission | +Description | +Status | ++ |
---|---|---|---|
{mission.mission_name} | +{mission.description} | +
+ + {mission.reserved ? 'ACTIVE MEMBER' : 'NOT A MEMBER'} + + |
+ + {!mission.reserved && ( + + )} + | +