mirror of https://github.com/msgbyte/tailchat
refactor: 聊天页面入口与placeholder
parent
0a927039ff
commit
e4d6df33b1
@ -0,0 +1,29 @@
|
|||||||
|
import { Skeleton } from 'antd';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const ChatBoxPlaceholder: React.FC = React.memo(() => {
|
||||||
|
return (
|
||||||
|
<div className="px-2 w-2/3">
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
<Skeleton className="mb-2" avatar={true} paragraph={{ rows: 1 }} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
ChatBoxPlaceholder.displayName = 'ChatBoxPlaceholder';
|
||||||
|
|
||||||
|
export const ChatBox: React.FC = React.memo(() => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ChatBoxPlaceholder />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
ChatBox.displayName = 'ChatBox';
|
@ -0,0 +1,19 @@
|
|||||||
|
import { ChatBox } from '@/components/ChatBox';
|
||||||
|
import React from 'react';
|
||||||
|
import { useParams } from 'react-router';
|
||||||
|
|
||||||
|
interface UserConversePanelParams {
|
||||||
|
converseUUID: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ConversePanel: React.FC = React.memo(() => {
|
||||||
|
const params = useParams<UserConversePanelParams>();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="w-full h-full overflow-hidden">
|
||||||
|
<div>{params.converseUUID}</div>
|
||||||
|
<ChatBox />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
ConversePanel.displayName = 'ConversePanel';
|
Loading…
Reference in New Issue