Skip to content

Commit

Permalink
fix: buttons on security page dont work
Browse files Browse the repository at this point in the history
  • Loading branch information
luceos committed Sep 4, 2024
1 parent bdba0b1 commit 290d81b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/src/forum/components/LinkStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import app from 'flarum/forum/app';
import Component, { ComponentAttrs } from 'flarum/common/Component';
import icon from 'flarum/common/helpers/icon';
import Button from 'flarum/common/components/Button';
import Link from 'flarum/common/components/Link';
import type Mithril from 'mithril';
import LinkedAccount from '../models/LinkedAccount';
import User from 'flarum/common/models/User';
Expand Down Expand Up @@ -73,16 +74,17 @@ export default class LinkStatus extends Component<IAttrs> {
} else if (!provider.orphaned() && (user.id() === app.session.user?.id() || !app.forum.attribute<boolean>('fofOauthModerate'))) {
return (
<div className="LinkedAccountsList-item-actions">
<Button
<Link
className={`Button FoFLogInButton LogInButton--${provider.name()}`}
icon={provider.icon()}
path={`/auth/${provider.name()}?linkTo=${user.id()}`}
href={`${app.forum.attribute('baseUrl')}/auth/${provider.name()}?linkTo=${user.id()}`}
loading={this.state.loading}
external={true}
>
{app.translator.trans(`fof-oauth.forum.log_in.with_${provider.name()}_button`, {
provider: app.translator.trans(`fof-oauth.forum.providers.${provider.name()}`),
})}
</Button>
</Link>
</div>
);
}
Expand Down

0 comments on commit 290d81b

Please sign in to comment.