Skip to content

Commit

Permalink
Merge pull request #1875 from ResearchHub/copy-fix
Browse files Browse the repository at this point in the history
(Live feed) published -> shared
  • Loading branch information
TylerDiorio authored Nov 4, 2024
2 parents d428c07 + 460443f commit e075228
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
22 changes: 3 additions & 19 deletions components/Home/sidebar/HomeRightSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,28 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faTimes } from "@fortawesome/pro-light-svg-icons";
import { getEducationalCarouselElements } from "~/components/shared/carousel/presets/RhEducationalCarouselElements";
import { INFO_TAB_EXIT_KEY } from "~/components/Banner/constants/exitable_banner_keys";
import { ReactElement, useState, useEffect } from "react";
import { styles } from "./styles/HomeRightSidebarStyles";
import colors from "~/config/themes/colors";
import ColumnContainer from "../../Paper/SideColumn/ColumnContainer";
import ExitableBanner from "~/components/Banner/ExitableBanner";
import HomeSidebarBountiesSection from "./HomeSidebarBountiesSection";
import { css, StyleSheet } from "aphrodite";
import RhCarousel from "~/components/shared/carousel/RhCarousel";
import { useSelector } from "react-redux";
import { RootState } from "~/redux";
import { parseUser } from "~/config/types/root_types";
import { isEmpty } from "~/config/utils/nullchecks";
import { useDismissableFeature } from "~/config/hooks/useDismissableFeature";
import useCurrentUser from "~/config/hooks/useCurrentUser";
import UnifiedCarousel from "./UnifiedCarousel";

export default function HomeRightSidebar(): ReactElement | null {
export default function HomeRightSidebar(): ReactElement {
const auth = useSelector((state: RootState) => state.auth);
const [dismissStatus, setDismissStatus] = useState<"unchecked" | "checked">("unchecked");

const {
isDismissed: isCarouselDismissed,
dismissFeature: dismissCarousel,
dismissStatus: carouselDismissStatus,
} = useDismissableFeature({ auth, featureName: "educational-carousel" });

// Don't render anything until we've confirmed the dismissal state
if (carouselDismissStatus === "unchecked") {
return null;
}

return (
<div className={css(styles.HomeRightSidebar)}>
<ColumnContainer overrideStyles={styles.HomeRightSidebarContainer}>
{!isCarouselDismissed && carouselDismissStatus === "checked" && (
{carouselDismissStatus === "checked" && !isCarouselDismissed && (
<UnifiedCarousel
onDismissCarousel={dismissCarousel}
onDismissCarousel={() => dismissCarousel()}
/>
)}
<HomeSidebarBountiesSection shouldLimitNumCards={!isCarouselDismissed} />
Expand Down
2 changes: 1 addition & 1 deletion components/Home/sidebar/HomeSidebarBountiesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default function HomeSidebarBountiesSection({
width: "100%",
}}
>
<div>{"Open Bounties"}</div>
<div>{"Open Grants"}</div>
<Link
href="/live?contentType=BOUNTY"
className={css(styles.viewAll)}
Expand Down
2 changes: 1 addition & 1 deletion components/LiveFeed/Contribution/ContributionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const ContributionHeader = ({ entry, context }: Args) => {
);
} else {
// @ts-ignore
actionLabel = <>{` published a ${item?.unifiedDocument?.documentType}`}</>;
actionLabel = <>{` shared a ${item?.unifiedDocument?.documentType}`}</>;
}

const moreOptionsId = `header-more-options-${entry?.contentType?.name}-${entry?.item?.id}`;
Expand Down

0 comments on commit e075228

Please sign in to comment.