Skip to content

Commit

Permalink
Merge branch 'dev' into feature/CW-1907-auto-info-card-opening
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Aug 1, 2023
2 parents e01ed12 + 7ea113b commit bb72145
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const AssignCircleStage: FC<AssignCircleStageProps> = (props) => {
// TODO: Use here name of common member
title: `Request to join ${
assignCircleData.circle.name
} circle by ${getUserName(assignCircleData.commonMember.user)}`,
} by ${getUserName(assignCircleData.commonMember.user)}`,
description: assignCircleData.description,
images: [],
links: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const PopoverItem: FC<CommonMemberInfoProps> = (props) => {
{
args: {
commonId,
title: `Request to join ${circleName} circle by ${userName}`,
description: `Join circle request: ${circleName}`,
title: `Request to join ${circleName} by ${userName}`,
description: `Join request: ${circleName}`,
images: [],
links: [],
files: [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { getVotersString } from "@/pages/OldCommon/containers/ProposalContainer/helpers";
import { Governance, Proposal } from "@/shared/models";
import { isAssignCircleProposal } from "@/shared/models/governance/proposals";
import styles from "./ImmediateProposalInfo.module.scss";

interface ImmediateProposalInfoProps {
Expand All @@ -14,15 +14,16 @@ export const ImmediateProposalInfo = ({
governanceCircles,
proposerUserName,
}: ImmediateProposalInfoProps) => {
const votersString = getVotersString(
proposal.global.weights,
governanceCircles,
);
const circleName = isAssignCircleProposal(proposal)
? Object.values(governanceCircles).find(
(circle) => circle.id === proposal.data.args.circleId,
)?.name
: "unknown";

return (
<div className={styles.container}>
<div className={styles.title}>
{`${proposerUserName} requests to join ${votersString} circle`}
{`${proposerUserName} requests to join ${circleName}`}
</div>
{/* Show this only when the required number of voters is greater than 1. Logic for this will be added in the future, see detalis here https://github.com/daostack/common-backend/issues/1844 */}
{/* <div className={styles.subtitle}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const getProposalTitleString = (

return `Request to join ${
targetCircle?.name ? `${targetCircle.name} ` : ""
}circle`;
}`;
}

return proposal.data.args.title;
Expand Down

0 comments on commit bb72145

Please sign in to comment.