mirror of https://github.com/shuang854/Turtle
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
740 B
TypeScript
27 lines
740 B
TypeScript
import { IonContent, IonItem, IonLabel, IonList } from '@ionic/react';
|
|
import React from 'react';
|
|
import './OnlineList.css';
|
|
|
|
type OnlineListProps = {
|
|
pane: string;
|
|
userList: Map<string, string>;
|
|
};
|
|
|
|
const OnlineList: React.FC<OnlineListProps> = ({ pane, userList }) => {
|
|
return (
|
|
<IonContent style={{ display: pane === 'online' ? null : 'none' }} class="online-content">
|
|
<IonList class="online-list">
|
|
{Array.from(userList.values()).map((user) => {
|
|
return (
|
|
<IonItem key={user} class="online-item" lines="none">
|
|
<IonLabel class="online-label">{user}</IonLabel>
|
|
</IonItem>
|
|
);
|
|
})}
|
|
</IonList>
|
|
</IonContent>
|
|
);
|
|
};
|
|
|
|
export default OnlineList;
|