diff --git a/src/components/ReviewsView.tsx b/src/components/ReviewsView.tsx index 1976769..7f6712d 100644 --- a/src/components/ReviewsView.tsx +++ b/src/components/ReviewsView.tsx @@ -1,10 +1,10 @@ import { webpack } from "replugged"; import { React, users } from "replugged/common"; import { FormText } from "replugged/components"; -import { reviewDBSettings } from "../utils"; -import { REVIEWS_PER_PAGE, getReviews } from "../reviewDBApi"; +import { reviewDBSettings, showToast } from "../utils"; +import { REVIEWS_PER_PAGE, addReview, getReviews } from "../reviewDBApi"; import ReviewComponent from "./ReviewComponent"; -import { Auth } from "../auth"; +import { Auth, authorize } from "../auth"; const { Editor, Transforms } = webpack.getByProps("Editor", "Transforms"); diff --git a/src/utils.ts b/src/utils.ts index 3d8e656..2c7155c 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -9,14 +9,13 @@ const { showToast: toast, ToastType, ToastPosition } = webpack.getByProps(["crea export const defaultSettings = {}; export const reviewDBSettings = await settings.init("dev.wolfplugs.reviewdb", defaultSettings); - export function showToast(message: string, type = ToastType.MESSAGE) { + toast({ - id: toast.genId(), message, type, options: { - position: ToastPosition.BOTTOM, // NOBODY LIKES TOASTS AT THE TOP + position: ToastPosition.BOTTOM, }, }); }