Skip to content

Commit

Permalink
Merge pull request #1476 from AletheiaFact/1423-button-overlay
Browse files Browse the repository at this point in the history
1423 - Fix Button Overlay
  • Loading branch information
thesocialdev authored Dec 5, 2024
2 parents 2c47e3c + ba6e68e commit 765f987
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/components/Debate/DebateHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DebateHeader = ({ claim, title, personalities, userRole }) => {
Promise.all(
personalities.map(async (p) => {
if (p && p._id) {
return personalityApi.getPersonality(p?._id, {nameSpace}, t);
return personalityApi.getPersonality(p?._id, { nameSpace }, t);
} else {
throw Error;
}
Expand All @@ -35,13 +35,12 @@ const DebateHeader = ({ claim, title, personalities, userRole }) => {
.then((newPersonalitiesArray) => {
setPersonalitiesArray(newPersonalitiesArray);
})
.catch(() => {});
.catch(() => { });
}
}, [state, personalities]);

const baseHref = `/${
nameSpace !== NameSpaceEnum.Main ? `${nameSpace}/` : ""
}`;
const baseHref = `/${nameSpace !== NameSpaceEnum.Main ? `${nameSpace}/` : ""
}`;
const href = `${baseHref}claim/${claim?.claimId}/debate/edit`;

const { vw } = useAppSelector((state) => state);
Expand Down Expand Up @@ -85,7 +84,8 @@ const DebateHeader = ({ claim, title, personalities, userRole }) => {
type={ButtonType.blue}
href={href}
style={{
margin: 10,
margin: 20,
marginRight: vw?.lg && vw?.md && vw?.sm ? 0 : 160,
}}
>
<span>{t("debates:openEditDebateMode")}</span>
Expand All @@ -99,32 +99,32 @@ const DebateHeader = ({ claim, title, personalities, userRole }) => {
>
{personalitiesArray
? personalitiesArray.map((p, index) => (
<Col
style={{
display: "flex",
justifyContent: "center",
alignItems: "flex-start",
width: "40%",
padding: "32px 0",
}}
key={p?._id || index}
>
<PersonalityCard
personality={p}
header={true}
fullWidth={true}
hoistAvatar={true}
centralizedInfo={true}
style={{
<Col
style={{
display: "flex",
justifyContent: "center",
alignItems: "flex-start",
width: "40%",
padding: "32px 0",
}}
key={p?._id || index}
>
<PersonalityCard
personality={p}
header={true}
fullWidth={true}
hoistAvatar={true}
centralizedInfo={true}
style={{
display: "flex",
justifyContent: "center",
textAlign: "center",
width: "100%",
padding: "20px",
}}
/>
</Col>
))
}}
/>
</Col>
))
: null}
</Row>
</Row>
Expand Down

0 comments on commit 765f987

Please sign in to comment.