mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
Add pending requests menu.
This commit is contained in:
26
src/context/intermediate/popovers/PendingRequests.tsx
Normal file
26
src/context/intermediate/popovers/PendingRequests.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import styles from "./UserPicker.module.scss";
|
||||
import { useUsers } from "../../revoltjs/hooks";
|
||||
import Modal from "../../../components/ui/Modal";
|
||||
import { Friend } from "../../../pages/friends/Friend";
|
||||
|
||||
interface Props {
|
||||
users: string[];
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export function PendingRequests({ users: ids, onClose }: Props) {
|
||||
const users = useUsers(ids);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={true}
|
||||
title={"Pending requests"}
|
||||
onClose={onClose}>
|
||||
<div className={styles.list}>
|
||||
{ users
|
||||
.filter(x => typeof x !== 'undefined')
|
||||
.map(x => <Friend user={x!} key={x!._id} />) }
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user