aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/reviewDB
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/reviewDB')
-rw-r--r--src/plugins/reviewDB/components/ReviewComponent.tsx5
-rw-r--r--src/plugins/reviewDB/utils.tsx13
2 files changed, 4 insertions, 14 deletions
diff --git a/src/plugins/reviewDB/components/ReviewComponent.tsx b/src/plugins/reviewDB/components/ReviewComponent.tsx
index ddcae0a..a23d654 100644
--- a/src/plugins/reviewDB/components/ReviewComponent.tsx
+++ b/src/plugins/reviewDB/components/ReviewComponent.tsx
@@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+import { openUserProfile } from "@utils/discord";
import { classes } from "@utils/misc";
import { LazyComponent } from "@utils/react";
import { filters, findBulk } from "@webpack";
@@ -24,7 +25,7 @@ import { Alerts, moment, Timestamp, UserStore } from "@webpack/common";
import { Review, ReviewType } from "../entities";
import { deleteReview, reportReview } from "../reviewDbApi";
import { settings } from "../settings";
-import { canDeleteReview, cl, openUserProfileModal, showToast } from "../utils";
+import { canDeleteReview, cl, showToast } from "../utils";
import { DeleteButton, ReportButton } from "./MessageButton";
import ReviewBadge from "./ReviewBadge";
@@ -49,7 +50,7 @@ export default LazyComponent(() => {
return function ReviewComponent({ review, refetch }: { review: Review; refetch(): void; }) {
function openModal() {
- openUserProfileModal(review.sender.discordID);
+ openUserProfile(review.sender.discordID);
}
function delReview() {
diff --git a/src/plugins/reviewDB/utils.tsx b/src/plugins/reviewDB/utils.tsx
index da800b0..a9c8ca5 100644
--- a/src/plugins/reviewDB/utils.tsx
+++ b/src/plugins/reviewDB/utils.tsx
@@ -20,24 +20,13 @@ import { classNameFactory } from "@api/Styles";
import { Logger } from "@utils/Logger";
import { openModal } from "@utils/modal";
import { findByProps } from "@webpack";
-import { FluxDispatcher, React, SelectedChannelStore, Toasts, UserUtils } from "@webpack/common";
+import { React, Toasts } from "@webpack/common";
import { Review, UserType } from "./entities";
import { settings } from "./settings";
export const cl = classNameFactory("vc-rdb-");
-export async function openUserProfileModal(userId: string) {
- await UserUtils.fetchUser(userId);
-
- await FluxDispatcher.dispatch({
- type: "USER_PROFILE_MODAL_OPEN",
- userId,
- channelId: SelectedChannelStore.getChannelId(),
- analyticsLocation: "Explosive Hotel"
- });
-}
-
export function authorize(callback?: any) {
const { OAuth2AuthorizeModal } = findByProps("OAuth2AuthorizeModal");