mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-30 08:11:14 +00:00
Fix linting error
This commit is contained in:
parent
8301c2eabb
commit
27335fa4bf
4 changed files with 7 additions and 7 deletions
|
@ -17,7 +17,7 @@ class AuthGuard extends Component<
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
props: RouteComponentProps<Record<string, string>>,
|
props: RouteComponentProps<Record<string, string>>,
|
||||||
context: any
|
context: any,
|
||||||
) {
|
) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ class AuthGuard extends Component<
|
||||||
if (!UserService.Instance.myUserInfo) {
|
if (!UserService.Instance.myUserInfo) {
|
||||||
const { pathname, search } = this.props.location;
|
const { pathname, search } = this.props.location;
|
||||||
this.context.router.history.replace(
|
this.context.router.history.replace(
|
||||||
`/login?prev=${encodeURIComponent(pathname + search)}`
|
`/login?prev=${encodeURIComponent(pathname + search)}`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.setState({ hasRedirected: true });
|
this.setState({ hasRedirected: true });
|
||||||
|
|
|
@ -66,7 +66,7 @@ export function SubscribeButton({
|
||||||
type="button"
|
type="button"
|
||||||
className={classNames(
|
className={classNames(
|
||||||
buttonClass,
|
buttonClass,
|
||||||
`btn-${subscribed === "Pending" ? "warning" : "secondary"}`
|
`btn-${subscribed === "Pending" ? "warning" : "secondary"}`,
|
||||||
)}
|
)}
|
||||||
onClick={subscribed === "NotSubscribed" ? onFollow : onUnFollow}
|
onClick={subscribed === "NotSubscribed" ? onFollow : onUnFollow}
|
||||||
>
|
>
|
||||||
|
@ -102,7 +102,7 @@ function focusInput() {
|
||||||
|
|
||||||
function submitRemoteFollow(
|
function submitRemoteFollow(
|
||||||
{ state: { instanceText }, props: { communityActorId } }: RemoteFetchModal,
|
{ state: { instanceText }, props: { communityActorId } }: RemoteFetchModal,
|
||||||
event: Event
|
event: Event,
|
||||||
) {
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ function submitRemoteFollow(
|
||||||
}
|
}
|
||||||
|
|
||||||
window.location.href = `${instanceText}/activitypub/externalInteraction?uri=${encodeURIComponent(
|
window.location.href = `${instanceText}/activitypub/externalInteraction?uri=${encodeURIComponent(
|
||||||
communityActorId
|
communityActorId,
|
||||||
)}`;
|
)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ async function handleLoginSubmit(i: Login, event: any) {
|
||||||
|
|
||||||
function handleLoginUsernameChange(i: Login, event: any) {
|
function handleLoginUsernameChange(i: Login, event: any) {
|
||||||
i.setState(
|
i.setState(
|
||||||
prevState => (prevState.form.username_or_email = event.target.value.trim())
|
prevState => (prevState.form.username_or_email = event.target.value.trim()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default function isAuthPath(pathname: string) {
|
export default function isAuthPath(pathname: string) {
|
||||||
return /^\/(create_.*?|inbox|settings|admin|reports|registration_applications|activitypub.*?)\b/g.test(
|
return /^\/(create_.*?|inbox|settings|admin|reports|registration_applications|activitypub.*?)\b/g.test(
|
||||||
pathname
|
pathname,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue