feat: switch to revolt.js@6.0.0 + new revolt-api

This commit is contained in:
Paul Makles
2022-04-09 15:47:04 +01:00
parent dc3925c003
commit b2f4411850
91 changed files with 528 additions and 460 deletions

View File

@@ -1,7 +1,7 @@
import { ArrowBack } from "@styled-icons/boxicons-regular";
import { autorun } from "mobx";
import { Redirect, useHistory, useParams } from "react-router-dom";
import { RetrievedInvite } from "revolt-api/types/Invites";
import { API } from "revolt.js";
import styles from "./Invite.module.scss";
import { Text } from "preact-i18n";
@@ -36,7 +36,7 @@ export default function Invite() {
const { code } = useParams<{ code: string }>();
const [processing, setProcessing] = useState(false);
const [error, setError] = useState<string | undefined>(undefined);
const [invite, setInvite] = useState<RetrievedInvite | undefined>(
const [invite, setInvite] = useState<API.InviteResponse | undefined>(
undefined,
);
@@ -92,6 +92,8 @@ export default function Invite() {
);
}
if (invite.type === "Group") return <h1>unimplemented</h1>;
return (
<div
className={styles.invite}