mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 07:02:10 -05:00
Fix: Should use observer not observable.
This commit is contained in:
parent
f8611ddea5
commit
748713be53
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
import { At, Hash, Menu } from "@styled-icons/boxicons-regular";
|
import { At, Hash, Menu } from "@styled-icons/boxicons-regular";
|
||||||
import { Notepad, Group } from "@styled-icons/boxicons-solid";
|
import { Notepad, Group } from "@styled-icons/boxicons-solid";
|
||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
|
import { observer } from "mobx-react-lite";
|
||||||
import { Channel } from "revolt.js";
|
import { Channel } from "revolt.js";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
|
@ -69,7 +70,7 @@ const Info = styled.div`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default observable(({ channel, toggleSidebar }: ChannelHeaderProps) => {
|
export default observer(({ channel, toggleSidebar }: ChannelHeaderProps) => {
|
||||||
const { openScreen } = useIntermediate();
|
const { openScreen } = useIntermediate();
|
||||||
const client = useClient();
|
const client = useClient();
|
||||||
const state = useData();
|
const state = useData();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { BarChart } from "@styled-icons/boxicons-regular";
|
import { BarChart } from "@styled-icons/boxicons-regular";
|
||||||
import { observable } from "mobx";
|
import { observable } from "mobx";
|
||||||
|
import { observer } from "mobx-react-lite";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
import { Text } from "preact-i18n";
|
import { Text } from "preact-i18n";
|
||||||
|
@ -69,7 +70,7 @@ const VoiceBase = styled.div`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default observable(({ id }: Props) => {
|
export default observer(({ id }: Props) => {
|
||||||
const { status, participants, roomId } = useContext(VoiceContext);
|
const { status, participants, roomId } = useContext(VoiceContext);
|
||||||
if (roomId !== id) return null;
|
if (roomId !== id) return null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue