From abcaa64b3d3e3f56d57f6a2fdf1dbb56628fac9a Mon Sep 17 00:00:00 2001 From: Psami-wondah Date: Thu, 27 Feb 2025 03:33:10 +0100 Subject: [PATCH] fix: review fixes --- src/app/hooks/useOneDrivePicker.tsx | 2 +- .../common/not-authorized-message/index.tsx | 351 ++++++++++-------- .../AssetCollection/Datasets/datasetsGrid.tsx | 11 - 3 files changed, 202 insertions(+), 162 deletions(-) diff --git a/src/app/hooks/useOneDrivePicker.tsx b/src/app/hooks/useOneDrivePicker.tsx index 3592530f2..75f6f8d31 100644 --- a/src/app/hooks/useOneDrivePicker.tsx +++ b/src/app/hooks/useOneDrivePicker.tsx @@ -21,7 +21,7 @@ export const useOneDrivePicker = ({ const msalParams = { auth: { authority: "https://login.microsoftonline.com/consumers", - clientId: "a5f756dd-d422-443e-93d2-3361f8a4a6f8", // Doesn't work if used as an env variable + clientId: "ce26cb41-0030-4516-9a0f-26c5c2df01ea", // Doesn't work if used as an env variable redirectUri: window.location.origin, }, }; diff --git a/src/app/modules/common/not-authorized-message/index.tsx b/src/app/modules/common/not-authorized-message/index.tsx index fa67cb7c2..efd8b123d 100644 --- a/src/app/modules/common/not-authorized-message/index.tsx +++ b/src/app/modules/common/not-authorized-message/index.tsx @@ -3,8 +3,9 @@ import { ErrorOutlineRounded } from "@material-ui/icons"; import HomeFooter from "app/modules/home-module/components/Footer"; import { ReactComponent as GoogleIcon } from "app/modules/onboarding-module/asset/google-img.svg"; import { ReactComponent as LinkedInIcon } from "app/modules/onboarding-module/asset/linkedIn-img.svg"; +import { ReactComponent as MicrosoftIcon } from "app/modules/onboarding-module/asset/microsoft-img.svg"; import ArrowBackIosIcon from "@material-ui/icons/ArrowBackIos"; -import { Container, useMediaQuery } from "@material-ui/core"; +import { Box, Container, useMediaQuery } from "@material-ui/core"; import { useAuth0 } from "@auth0/auth0-react"; import { socialAuth } from "app/utils/socialAuth"; import { Link, useHistory, useLocation } from "react-router-dom"; @@ -23,170 +24,220 @@ export function NotAuthorizedMessageModule(props: { return ( <> -
- -
- {isMobile && history.go(-1)} />} -

+ +
- {props.name} -

-
-
-
-
history.go(-1)} />} +

+ {props.name} +

+
+ + + ) : null} + +
svg { - transform: scale(0.8); + > svg { + transform: scale(0.8); + } } - } - @media (max-width: 500px) { - flex-direction: column; - align-items: center; - button { - width: 86%; + @media (max-width: 500px) { + flex-direction: column; + align-items: center; + button { + width: 86%; + } + } + @media (max-width: 767px) { + height: calc(100vh - 124px - ${props.name ? "100" : "50"}px); + button { + width: 100%; + } } - } - @media (max-width: 767px) { - padding-top: 200px; - } - `} - > - {" "} -

Error

-

- {isAuthenticated ? ( - <> - You are not authorized to {props.action} this {props.asset}. - Please contact
your administrator. - - ) : ( - <> - You are not authorized to {props.action} this {props.asset}. - Please sign in
or contact your administrator. - - )} -

- {!isAuthenticated && ( -
- - -
- )} - {isAuthenticated && ( -
{" "} +

Error

+

- - Back to Dashboard -

- )} -
- + {isAuthenticated ? ( + <> + You are not authorized to {props.action} this {props.asset}. + Please contact
your administrator. + + ) : ( + <> + You are not authorized to {props.action} this {props.asset}. + Please sign in
or contact your administrator. + + )} +

+ {!isAuthenticated && ( +
svg { + transform: scale(0.8); + } + :hover { + opacity: 0.8; + cursor: pointer; + } + @media (max-width: 767px) { + width: 100%; + } + } + `} + > + + + + + +
+ )} + {isAuthenticated && ( +
+ + Back to Dashboard +
+ )} + +
+ ); } diff --git a/src/app/modules/home-module/components/AssetCollection/Datasets/datasetsGrid.tsx b/src/app/modules/home-module/components/AssetCollection/Datasets/datasetsGrid.tsx index d285b7efc..b1071ba8e 100644 --- a/src/app/modules/home-module/components/AssetCollection/Datasets/datasetsGrid.tsx +++ b/src/app/modules/home-module/components/AssetCollection/Datasets/datasetsGrid.tsx @@ -266,17 +266,6 @@ export default function DatasetsGrid(props: Readonly) { a{ pointer-events: none; } - > div { - >div{ - - width: 100%; - - &:hover { - cursor: pointer; - border: 1px solid #6061E5; - } - } - } ` : "" }