mirror of
https://github.com/Equicord/Equicord.git
synced 2025-04-01 13:11:57 -04:00
Fixed lint error
This commit is contained in:
parent
4269a8dd5b
commit
ae8a498e07
1 changed files with 20 additions and 20 deletions
|
@ -1,20 +1,20 @@
|
||||||
/*
|
/*
|
||||||
* Vencord, a Discord client mod
|
* Vencord, a Discord client mod
|
||||||
* Copyright (c) 2025 Vendicated and contributors*
|
* Copyright (c) 2025 Vendicated and contributors
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import "./styles.css";
|
import "./styles.css";
|
||||||
|
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
import ErrorBoundary from "@components/ErrorBoundary";
|
||||||
|
import { EquicordDevs } from "@utils/constants";
|
||||||
|
import { Logger } from "@utils/Logger";
|
||||||
|
import definePlugin from "@utils/types";
|
||||||
import { findByCodeLazy } from "@webpack";
|
import { findByCodeLazy } from "@webpack";
|
||||||
import { React } from "@webpack/common";
|
import { React } from "@webpack/common";
|
||||||
import definePlugin from "@utils/types";
|
|
||||||
|
|
||||||
import { Logger } from "@utils/Logger";
|
|
||||||
import { settings } from "./utils/settings";
|
|
||||||
import { GitHubReposComponent } from "./components/GitHubReposComponent";
|
import { GitHubReposComponent } from "./components/GitHubReposComponent";
|
||||||
import { Devs } from "@utils/constants";
|
import { settings } from "./utils/settings";
|
||||||
|
|
||||||
const getProfileThemeProps = findByCodeLazy(".getPreviewThemeColors", "primaryColor:");
|
const getProfileThemeProps = findByCodeLazy(".getPreviewThemeColors", "primaryColor:");
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ const profilePopoutComponent = ErrorBoundary.wrap(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
noop: true,
|
noop: true,
|
||||||
onError: (err) => {
|
onError: err => {
|
||||||
logger.error("Error in profile popout component", err);
|
logger.error("Error in profile popout component", err);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ const profilePopoutComponent = ErrorBoundary.wrap(
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "GitHubRepos",
|
name: "GitHubRepos",
|
||||||
description: "Displays a user's public GitHub repositories in their profile",
|
description: "Displays a user's public GitHub repositories in their profile",
|
||||||
authors: [Devs.talhakf],
|
authors: [EquicordDevs.talhakf],
|
||||||
settings,
|
settings,
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
|
@ -65,19 +65,19 @@ export default definePlugin({
|
||||||
const originalReturn = ${returnStatement};
|
const originalReturn = ${returnStatement};
|
||||||
const user = this.props.user;
|
const user = this.props.user;
|
||||||
if (!user) return originalReturn;
|
if (!user) return originalReturn;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const component = $self.profilePopoutComponent({
|
const component = $self.profilePopoutComponent({
|
||||||
user: user,
|
user: user,
|
||||||
displayProfile: this.props.displayProfile
|
displayProfile: this.props.displayProfile
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!originalReturn) return component;
|
if (!originalReturn) return component;
|
||||||
|
|
||||||
return React.createElement(
|
return React.createElement(
|
||||||
React.Fragment,
|
React.Fragment,
|
||||||
null,
|
null,
|
||||||
originalReturn,
|
originalReturn,
|
||||||
component
|
component
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -99,4 +99,4 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
profilePopoutComponent
|
profilePopoutComponent
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue