diff --git a/app/components/dashboard/index.js b/app/components/dashboard/index.js index 6b78e13..e2d8525 100644 --- a/app/components/dashboard/index.js +++ b/app/components/dashboard/index.js @@ -18,9 +18,12 @@ import { fetchHistoryDataFailure, } from "../../store/actions/dataActions"; import axios from "axios"; +import { useUser } from "@auth0/nextjs-auth0/client"; +import Link from "next/link"; const Dashboard = () => { const dispatch = useDispatch(); + const { user } = useUser(); const isMobile = typeof window !== "undefined" && window.innerWidth <= 768; @@ -98,215 +101,233 @@ const Dashboard = () => { return
Loading...
; } + console.log("*** ", user); + return ( -
- {isMobile ? ( -
- nba banner - nba banner -
- ) : ( -
- nba banner - nba banner -
- )} -
- -
- - Today's Games: {formattedToday} - - - - - - -
- {predictions.data.length > 0 && - predictions.data.map((item, index) => ( -
- - {index + 1 < 10 ? "0" + (index + 1) : index + 1} + <> + {user ? ( +
+ {isMobile ? ( +
+ nba banner + nba banner +
+ ) : ( +
+ nba banner + nba banner +
+ )} +
+ +
+ + Today's Games: {formattedToday} + + + + + -
-
- {item.home_team === item.prediction && ( - - Chances of {item.home_team} winning are {item.win_percentage}% - - } - placement="left" - arrow - > - - - - - )} - {item.home_team} - {!isMobile && } -
-
- VS -
- {item.home_team === item.prediction && } - {item.win_percentage}% - {item.away_team === item.prediction && } -
- - {item.home_team === item.prediction && } - {item.win_percentage}% - {item.away_team === item.prediction && } +
+ {predictions.data.length > 0 && + predictions.data.map((item, index) => ( +
+ + {index + 1 < 10 ? "0" + (index + 1) : index + 1} +
+
+ {item.home_team === item.prediction && ( + + Chances of {item.home_team} winning are {item.win_percentage}% + + } + placement="left" + arrow + > + + + + + )} + {item.home_team} + {!isMobile && } +
+
+ VS +
+ {item.home_team === item.prediction && } + {item.win_percentage}% + {item.away_team === item.prediction && } +
+ + {item.home_team === item.prediction && } + {item.win_percentage}% + {item.away_team === item.prediction && } + +
+
+ {!isMobile && } + {item.away_team} + {item.away_team === item.prediction && ( + + Chances of {item.away_team} winning are {item.win_percentage}% + + } + placement="right" + arrow + > + + + + + )} +
+
+
+
+ {!isMobile && ( + + Prediction: {item.prediction} + + )} +
+ +
+
-
- {!isMobile && } - {item.away_team} - {item.away_team === item.prediction && ( - - Chances of {item.away_team} winning are {item.win_percentage}% - - } - placement="right" - arrow - > - - - - - )} -
-
-
-
- {!isMobile && ( - - Prediction: {item.prediction} - - )} -
-
+
+ +
+ + History + + +
+
+ {currentHistoryItems && + currentHistoryItems.map((item, index) => ( +
- } - checkedIcon={} - /> - BET - -
-
+ {!item.dummy && ( + <> +
+
+ {item.home_team === item.prediction && ( + + Our Prediction: {item.prediction} +
+ Actual Result: {item.win} + + } + placement="bottom" + arrow + > + + + +
+ )} + {item.home_team} + {!isMobile && } +
+
+ {item.date} + VS +
+ {item.home_team === item.prediction && } + {item.win_percentage}% + {item.away_team === item.prediction && } +
+
+
+ {!isMobile && } + {item.away_team} + {item.away_team === item.prediction && ( + + Our Prediction: {item.prediction} +
+ Actual Result: {item.win} + + } + placement="bottom" + arrow + > + + + +
+ )} +
+
+
+
+ + Results: + {item.win} + +
+ + )} +
+ ))}
- ))} - -
-
- -
- - History + +
+
+ + Notice: Our content is intended for individuals aged 18 and older. The information provided is strictly for entertainment purposes only, + not advice. We are not liable for any outcomes. -
-
- {currentHistoryItems && - currentHistoryItems.map((item, index) => ( -
- {!item.dummy && ( - <> -
-
- {item.home_team === item.prediction && ( - - Our Prediction: {item.prediction} -
- Actual Result: {item.win} - - } - placement="bottom" - arrow - > - - - -
- )} - {item.home_team} - {!isMobile && } -
-
- {item.date} - VS -
- {item.home_team === item.prediction && } - {item.win_percentage}% - {item.away_team === item.prediction && } -
-
-
- {!isMobile && } - {item.away_team} - {item.away_team === item.prediction && ( - - Our Prediction: {item.prediction} -
- Actual Result: {item.win} - - } - placement="bottom" - arrow - > - - - -
- )} -
-
-
-
- - Results: - {item.win} - -
- - )} -
- ))} +
+ ) : ( +
+ You are Signed Out Please Sign In again to continue... +
+ + +
- -
-
- Notice: Our content is intended for individuals aged 18 and older. The information provided is strictly for entertainment purposes only, not advice. We are not liable for any outcomes. -
-
+
+ )} + ); }; diff --git a/app/components/dashboard/styles.css b/app/components/dashboard/styles.css index f878fc7..6dd2548 100644 --- a/app/components/dashboard/styles.css +++ b/app/components/dashboard/styles.css @@ -212,6 +212,23 @@ .mobile-percentage { display: none; } + +.signed-out { + width: 100%; + height: 100%; + display: flex; + flex-direction: row; + gap: 5px; + align-items: center; + justify-content: center; + margin-top: 150px; +} + +.button-group { + display: flex; + gap: 10px; +} + @media (max-width: 768px) { .match-card { min-height: 120px;