@@ -138,9 +142,12 @@ type ButtonProps = CommonProps & {
compact?: boolean
}
-export default function ButtonItem({ active, alert, alertCount, onClick, className, children, compact }: ButtonProps) {
+export default function ButtonItem(props: ButtonProps) {
+ const { active, alert, alertCount, onClick, className, children, compact, ...divProps } = props;
+
return (
-
diff --git a/src/components/navigation/right/MemberSidebar.tsx b/src/components/navigation/right/MemberSidebar.tsx
index 97383549..96b3728f 100644
--- a/src/components/navigation/right/MemberSidebar.tsx
+++ b/src/components/navigation/right/MemberSidebar.tsx
@@ -8,11 +8,12 @@ import { UserButton } from "../items/ButtonItem";
import { ChannelDebugInfo } from "./ChannelDebugInfo";
import { Channels, Servers, Users } from "revolt.js/dist/api/objects";
import { GenericSidebarBase, GenericSidebarList } from "../SidebarBase";
+import { useIntermediate } from "../../../context/intermediate/Intermediate";
import { ClientboundNotification } from "revolt.js/dist/websocket/notifications";
+import { AppContext, ClientStatus, StatusContext } from "../../../context/revoltjs/RevoltClient";
import { HookContext, useChannel, useForceUpdate, useUsers } from "../../../context/revoltjs/hooks";
import placeholderSVG from "../items/placeholder.svg";
-import { AppContext, ClientStatus, StatusContext } from "../../../context/revoltjs/RevoltClient";
interface Props {
ctx: HookContext
@@ -31,6 +32,7 @@ export default function MemberSidebar(props: { channel?: Channels.Channel }) {
}
export function GroupMemberSidebar({ channel, ctx }: Props & { channel: Channels.GroupChannel }) {
+ const { openScreen } = useIntermediate();
const users = useUsers(undefined, ctx);
let members = channel.recipients
.map(x => users.find(y => y?._id === x))
@@ -112,13 +114,11 @@ export function GroupMemberSidebar({ channel, ctx }: Props & { channel: Channels
{members.map(
user =>
user && (
- //
-
- //
+ openScreen({ id: 'profile', user_id: user._id })} />
)
)}
diff --git a/src/context/intermediate/Intermediate.tsx b/src/context/intermediate/Intermediate.tsx
index ff723c0b..3fb81674 100644
--- a/src/context/intermediate/Intermediate.tsx
+++ b/src/context/intermediate/Intermediate.tsx
@@ -98,7 +98,7 @@ export default function Intermediate(props: Props) {
const navigate = (path: string) => history.push(path);
const subs = [
- internalSubscribe("Intermediate", "open_profile", openProfile),
+ internalSubscribe("Intermediate", "openProfile", openProfile),
internalSubscribe("Intermediate", "navigate", navigate)
]