Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong circle name in immediate proposals #1908 #1909

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading