feat(modal): implement new server identity modal

closes #172
This commit is contained in:
Paul Makles
2022-06-18 15:54:17 +01:00
parent f685352963
commit 03e177f865
11 changed files with 171 additions and 145 deletions

View File

@@ -3,7 +3,13 @@ import { useHistory } from "react-router-dom";
import { API, Channel, Message, Server, User } from "revolt.js";
import { createContext } from "preact";
import { useContext, useEffect, useMemo, useState } from "preact/hooks";
import {
StateUpdater,
useContext,
useEffect,
useMemo,
useState,
} from "preact/hooks";
import type { Action } from "@revoltchat/ui/esm/components/design/atoms/display/Modal";
@@ -128,12 +134,11 @@ interface Props {
children: Children;
}
export let __thisIsAHack;
export let __thisIsAHack: StateUpdater<Screen>;
export default function Intermediate(props: Props) {
const [screen, openScreen] = useState<Screen>({ id: "none" });
__thisIsAHack = openScreen;
const settings = useApplicationState().settings;
const history = useHistory();
const value = {