feature/IO-3123-Code-Review-Adjustments: Make Code review adjustments
This commit is contained in:
@@ -3,7 +3,6 @@ import { Button } from "antd";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { SiMicrosoftteams } from "react-icons/si";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
||||
@@ -43,14 +42,6 @@ const ShareToTeamsComponent = ({
|
||||
const location = useLocation();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const {
|
||||
treatments: { Share_To_Teams }
|
||||
} = useSplitTreatments({
|
||||
attributes: {},
|
||||
names: ["Share_To_Teams"],
|
||||
splitKey: bodyshop && bodyshop.imexshopid
|
||||
});
|
||||
|
||||
const currentUrl =
|
||||
urlOverride ||
|
||||
encodeURIComponent(`${window.location.origin}${location.pathname}${location.search}${location.hash}`);
|
||||
@@ -78,7 +69,8 @@ const ShareToTeamsComponent = ({
|
||||
window.open(teamsShareUrl, "_blank", windowFeatures);
|
||||
};
|
||||
|
||||
if (Share_To_Teams?.treatment !== "on") {
|
||||
// Feature is disabled
|
||||
if (!bodyshop?.md_functionality_toggles?.teams) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user