correct popUpMessenge in MyEntries

This commit is contained in:
Mateusz Tylka 2023-06-30 14:05:14 +02:00
parent 3610415657
commit d645964266
4 changed files with 52 additions and 13 deletions

View File

@ -18,7 +18,6 @@ const App = () => {
<ThemeProvider theme={theme}>
<BrowserRouter>
<PopUpMessageManager>
<NavigationManager>
<RoutingManager />
</NavigationManager>

View File

@ -16,15 +16,30 @@ const RoutingManager = (props) => {
<Routes>
<Route
path={`${CHALLENGE_PAGE}/:challengeId`}
element={<Challenge section={CHALLENGE_SECTIONS.LEADERBOARD} />}
element={
<Challenge
section={CHALLENGE_SECTIONS.LEADERBOARD}
popUpMessageHandler={props.popUpMessageHandler}
/>
}
/>
<Route
path={`${CHALLENGE_PAGE}/:challengeId/leaderboard`}
element={<Challenge section={CHALLENGE_SECTIONS.LEADERBOARD} />}
element={
<Challenge
section={CHALLENGE_SECTIONS.LEADERBOARD}
popUpMessageHandler={props.popUpMessageHandler}
/>
}
/>
<Route
path={`${CHALLENGE_PAGE}/:challengeId/allentries`}
element={<Challenge section={CHALLENGE_SECTIONS.ALL_ENTRIES} popUpMessageHandler={props.popUpMessageHandler} />}
element={
<Challenge
section={CHALLENGE_SECTIONS.ALL_ENTRIES}
popUpMessageHandler={props.popUpMessageHandler}
/>
}
/>
<Route
path={`${CHALLENGE_PAGE}/:challengeId/readme`}
@ -41,13 +56,26 @@ const RoutingManager = (props) => {
/>
<Route
path={`${CHALLENGE_PAGE}/:challengeId/myentries`}
element={<Challenge section={CHALLENGE_SECTIONS.MY_ENTRIES} popUpMessageHandler={props.popUpMessageHandler} />}
element={
<Challenge
section={CHALLENGE_SECTIONS.MY_ENTRIES}
popUpMessageHandler={props.popUpMessageHandler}
/>
}
/>
<Route
path={`${CHALLENGE_PAGE}/:challengeId/submit`}
element={<Challenge section={CHALLENGE_SECTIONS.SUBMIT} />}
element={
<Challenge
section={CHALLENGE_SECTIONS.SUBMIT}
popUpMessageHandler={props.popUpMessageHandler}
/>
}
/>
<Route
path={CHALLENGES_PAGE}
element={<Challenges popUpMessageHandler={props.popUpMessageHandler} />}
/>
<Route path={CHALLENGES_PAGE} element={<Challenges popUpMessageHandler={props.popUpMessageHandler} />} />
<Route
path={POLICY_PRIVACY_PAGE}
element={
@ -74,8 +102,18 @@ const RoutingManager = (props) => {
/>
{KeyCloakService.isLoggedIn() ? (
<>
<Route exact path="/" element={<Challenges popUpMessageHandler={props.popUpMessageHandler} />} />
<Route element={<Challenges popUpMessageHandler={props.popUpMessageHandler} />} />
<Route
exact
path="/"
element={
<Challenges popUpMessageHandler={props.popUpMessageHandler} />
}
/>
<Route
element={
<Challenges popUpMessageHandler={props.popUpMessageHandler} />
}
/>
</>
) : (
<>

View File

@ -2,6 +2,7 @@ import styled from 'styled-components';
const TableStyle = styled.table`
border-collapse: separate;
border-spacing: 12px 0;
width: 100%;
.TableStyle__th {

View File

@ -112,6 +112,7 @@ const MyEntries = (props) => {
items={elements}
orderedKeys={orderKeys(myEntries[0])}
sortByUpdate={sortByUpdate}
popUpMessageHandler={props.popUpMessageHandler}
/>
</div>
)}