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

chore: Separate post mod buttons into functions #1599

Merged
merged 9 commits into from
Jun 26, 2023
Prev Previous commit
Next Next commit
fix: Remove extraneous classes
  • Loading branch information
jsit committed Jun 25, 2023
commit 69966369d3c182ec8821f45e013239d4aa6bd740
16 changes: 8 additions & 8 deletions src/shared/components/post/post-listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get modBanFromCommunityButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModBanFromCommunityShow)}
aria-label={I18NextService.i18n.t("ban_from_community")}
>
Expand All @@ -997,7 +997,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get modUnbanFromCommunityButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModBanFromCommunitySubmit)}
aria-label={I18NextService.i18n.t("unban")}
>
Expand All @@ -1009,7 +1009,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get addModToCommunityButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleAddModToCommunity)}
aria-label={
this.creatorIsMod_
Expand All @@ -1031,7 +1031,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get modBanButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModBanShow)}
aria-label={I18NextService.i18n.t("ban_from_site")}
>
Expand All @@ -1043,7 +1043,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get modUnbanButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModBanSubmit)}
aria-label={I18NextService.i18n.t("unban_from_site")}
>
Expand All @@ -1059,7 +1059,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get purgePersonButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handlePurgePersonShow)}
aria-label={I18NextService.i18n.t("purge_user")}
>
Expand All @@ -1071,7 +1071,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get purgePostButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handlePurgePostShow)}
aria-label={I18NextService.i18n.t("purge_post")}
>
Expand All @@ -1083,7 +1083,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
get toggleAdminButton() {
return (
<button
className="btn btn-link btn-animate text-muted py-0 dropdown-item"
className="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleAddAdmin)}
>
{this.state.addAdminLoading ? (
Expand Down