Refactor matrix hooks
This commit is contained in:
@@ -19,10 +19,7 @@ import { useHistory, useLocation, Link } from "react-router-dom";
|
||||
import { ReactComponent as Logo } from "../icons/LogoLarge.svg";
|
||||
import { FieldRow, InputField, ErrorMessage } from "../Input";
|
||||
import { Button } from "../button";
|
||||
import {
|
||||
defaultHomeserver,
|
||||
defaultHomeserverHost,
|
||||
} from "../ConferenceCallManagerHooks";
|
||||
import { defaultHomeserver, defaultHomeserverHost } from "../matrix-utils";
|
||||
import styles from "./LoginPage.module.css";
|
||||
import { useInteractiveLogin } from "./useInteractiveLogin";
|
||||
|
||||
|
||||
@@ -18,10 +18,8 @@ import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
import { FieldRow, InputField, ErrorMessage } from "../Input";
|
||||
import { Button } from "../button";
|
||||
import {
|
||||
useClient,
|
||||
defaultHomeserverHost,
|
||||
} from "../ConferenceCallManagerHooks";
|
||||
import { useClient } from "../ClientContext";
|
||||
import { defaultHomeserverHost } from "../matrix-utils";
|
||||
import { useInteractiveRegistration } from "./useInteractiveRegistration";
|
||||
import styles from "./LoginPage.module.css";
|
||||
import { ReactComponent as Logo } from "../icons/LogoLarge.svg";
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import matrix, { InteractiveAuth } from "matrix-js-sdk/src/browser-index";
|
||||
import { useState, useCallback } from "react";
|
||||
import {
|
||||
useClient,
|
||||
initClient,
|
||||
defaultHomeserver,
|
||||
} from "../ConferenceCallManagerHooks";
|
||||
import { useClient } from "../ClientContext";
|
||||
import { initClient, defaultHomeserver } from "../matrix-utils";
|
||||
|
||||
export function useInteractiveLogin() {
|
||||
const { setClient } = useClient();
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import matrix, { InteractiveAuth } from "matrix-js-sdk/src/browser-index";
|
||||
import { useState, useEffect, useCallback, useRef } from "react";
|
||||
import {
|
||||
useClient,
|
||||
initClient,
|
||||
defaultHomeserver,
|
||||
} from "../ConferenceCallManagerHooks";
|
||||
import { useClient } from "../ClientContext";
|
||||
import { initClient, defaultHomeserver } from "../matrix-utils";
|
||||
|
||||
export function useInteractiveRegistration() {
|
||||
const { setClient } = useClient();
|
||||
|
||||
Reference in New Issue
Block a user