From bcd45edb2f16e22bfda0fb7842c3d8123e39e590 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 2 Apr 2024 17:23:54 +0100 Subject: [PATCH] added game link to env file --- .env | 5 +++- .env.development | 5 +++- .env.production | 5 +++- src/components/Iframe/Iframe.jsx | 12 +++++++++ .../MyActiveJobs/ActiveJobsMedia.jsx | 3 +-- src/components/Partials/MediaHeader.jsx | 3 +-- src/components/Partials/MediaLayout.jsx | 4 +-- src/components/familyResources/FamGames.jsx | 26 +++++++++++++++---- src/views/FamGamesPage.jsx | 21 ++++++++++++--- 9 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 src/components/Iframe/Iframe.jsx diff --git a/.env b/.env index 949303d..51e90d8 100644 --- a/.env +++ b/.env @@ -118,4 +118,7 @@ REACT_APP_SHOW_ACCOUNT_DASH=1 REACT_APP_SHOW_SLIDER_BANNERS=0 # FOR MEDIA LINK -REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' \ No newline at end of file +REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' + +# FOR FAMILY GAME LINK +REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' \ No newline at end of file diff --git a/.env.development b/.env.development index 3e1b1be..0d41f9c 100644 --- a/.env.development +++ b/.env.development @@ -86,4 +86,7 @@ REACT_APP_SHOW_ACCOUNT_DASH=1 REACT_APP_SHOW_SLIDER_BANNERS=0 # FOR MEDIA LINK -REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' \ No newline at end of file +REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' + +# FOR FAMILY GAME LINK +REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' \ No newline at end of file diff --git a/.env.production b/.env.production index 615202b..04014b2 100644 --- a/.env.production +++ b/.env.production @@ -92,4 +92,7 @@ REACT_APP_SHOW_ACCOUNT_DASH=1 REACT_APP_SHOW_SLIDER_BANNERS=0 # FOR MEDIA LINK -REACT_APP_MEDIA_LINK='https://media.wrenchboard.com' \ No newline at end of file +REACT_APP_MEDIA_LINK='https://media.wrenchboard.com' + +# FOR FAMILY GAME LINK +REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' \ No newline at end of file diff --git a/src/components/Iframe/Iframe.jsx b/src/components/Iframe/Iframe.jsx new file mode 100644 index 0000000..1b362b8 --- /dev/null +++ b/src/components/Iframe/Iframe.jsx @@ -0,0 +1,12 @@ +import React from 'react' + +export default function Iframe({src, title}) { + return ( + + ) +} diff --git a/src/components/MyActiveJobs/ActiveJobsMedia.jsx b/src/components/MyActiveJobs/ActiveJobsMedia.jsx index 3e545eb..a40f143 100644 --- a/src/components/MyActiveJobs/ActiveJobsMedia.jsx +++ b/src/components/MyActiveJobs/ActiveJobsMedia.jsx @@ -273,8 +273,7 @@ function ActiveJobsMedia(props) { return ( {/* job title */} {/*
diff --git a/src/components/Partials/MediaHeader.jsx b/src/components/Partials/MediaHeader.jsx index 9d1f502..612b775 100644 --- a/src/components/Partials/MediaHeader.jsx +++ b/src/components/Partials/MediaHeader.jsx @@ -19,7 +19,7 @@ import TimeDifference from "../Helpers/TimeDifference"; const DEFAULT_PROFILE_IMAGE = require("../../assets/images/profile.jpg"); -export default function MediaHeader({ logoutModalHandler, sidebarHandler, backpath, state, title }) { +export default function MediaHeader({ logoutModalHandler, sidebarHandler, backpath, title }) { const darkMode = useContext(DarkModeContext); @@ -172,7 +172,6 @@ export default function MediaHeader({ logoutModalHandler, sidebarHandler, backpa onClick={() => { if (backpath == "/manage-family") { navigate(backpath, - { state: state ? { ...state } : {} }, { replace: true } ); } else { diff --git a/src/components/Partials/MediaLayout.jsx b/src/components/Partials/MediaLayout.jsx index d1f9fc4..8869d76 100644 --- a/src/components/Partials/MediaLayout.jsx +++ b/src/components/Partials/MediaLayout.jsx @@ -10,7 +10,7 @@ import RightSideBar from "./RightSideBar"; import Sidebar from "./Sidebar"; import MediaHeader from "./MediaHeader"; -export default function MediaLayout({backpath, title, state, children }) { +export default function MediaLayout({backpath, title, children }) { const { drawer } = useSelector((state) => state.drawer); const { userJobList } = useSelector((state) => state.userJobList); const dispatch = useDispatch(); @@ -69,7 +69,7 @@ export default function MediaLayout({backpath, title, state, children }) {
{/* header */}
- setMobileSidebar.toggle()} logoutModalHandler={logoutModalHandler} /> + setMobileSidebar.toggle()} logoutModalHandler={logoutModalHandler} />
{/* container */}
diff --git a/src/components/familyResources/FamGames.jsx b/src/components/familyResources/FamGames.jsx index e9f2a2f..5bbaf9b 100644 --- a/src/components/familyResources/FamGames.jsx +++ b/src/components/familyResources/FamGames.jsx @@ -1,4 +1,4 @@ -import React, { useRef, useState } from 'react' +import React, { lazy, Suspense, useRef, useState } from 'react' import Layout from '../Partials/Layout' import MediaLayout from '../Partials/MediaLayout' import CustomBreadcrumb from '../Breadcrumb/CustomBreadcrumb' @@ -9,6 +9,8 @@ import { useNavigate } from 'react-router-dom' import { useSelector } from 'react-redux' import { useReactToPrint } from 'react-to-print' +const Iframe = lazy(() => import("../Iframe/Iframe")); + export default function FamGames() { const ApiCall = new usersService(); @@ -229,8 +231,7 @@ export default function FamGames() { return ( {/*
-
- {/* */} +
+ }> +