feature/IO-3123-Code-Review-Adjustments: Make Code review adjustments

This commit is contained in:
Dave Richer
2025-02-04 12:28:22 -05:00
parent e54692928b
commit f288b0ee22
11 changed files with 102 additions and 93 deletions

View File

@@ -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;
}