Skip to content

Commit

Permalink
Fix community posting (#308)
Browse files Browse the repository at this point in the history
* chore: Format

* Fix community post button

---------

Co-authored-by: Bo Yao <[email protected]>
  • Loading branch information
carina-akaia and ailisp authored Oct 19, 2023
1 parent 8e16134 commit b21662a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
26 changes: 18 additions & 8 deletions src/gigs-board/components/layout/Controls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,32 @@ const buttonStyle = {
};

return (
<div class="d-flex flex-row-reverse" className={props.className}>
<div className="d-flex flex-row-reverse" className={props.className}>
{props.href ? (
<a class="btn btn-light" style={buttonStyle} href={props.href}>
<a
className="btn btn-light text-decoration-none"
style={buttonStyle}
href={props.href}
>
<i
class="bi"
className="bi"
className={props.icon ? props.icon : "bi-plus-circle-fill"}
></i>
/>

{props.title}
</a>
) : (
<button class="btn btn-light" style={buttonStyle} onClick={props.onClick}>
<button
className="btn btn-light"
style={buttonStyle}
onClick={props.onClick}
>
<i
class="bi"
className="bi"
className={props.icon ? props.icon : "bi-plus-circle-fill"}
></i>
{props.title || "Post"}
/>

{props.title}
</button>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/gigs-board/pages/community/activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ const CommunityActivityPage = ({ handle }) => {
})}
</small>
{widget("components.layout.Controls", {
labels: communityData.tag,
title: "Post",
href: href("Create", { labels: [communityData.tag] }),
})}
</div>
</div>
Expand Down

0 comments on commit b21662a

Please sign in to comment.