Skip to content

Commit

Permalink
refactor: add webpanel a group panel container
Browse files Browse the repository at this point in the history
for futher support mobile
  • Loading branch information
moonrailgun committed Nov 10, 2023
1 parent ed3e9ca commit 3b7973e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import React from 'react';
import { Translate } from '../translate';
import { WebviewKeepAlive } from '@capital/component';
import { GroupPanelContainer, WebviewKeepAlive } from '@capital/component';
import urlRegex from 'url-regex';
import { useGroupPanelContext } from '@capital/common';

const GroupWebPanelRender: React.FC<{ panelInfo: any }> = (props) => {
const { groupId, panelId } = useGroupPanelContext();
const panelInfo = props.panelInfo;

if (!panelInfo) {
Expand All @@ -20,7 +22,9 @@ const GroupWebPanelRender: React.FC<{ panelInfo: any }> = (props) => {
}

return (
<WebviewKeepAlive key={String(url)} className="w-full h-full" url={url} />
<GroupPanelContainer groupId={groupId} panelId={panelId}>
<WebviewKeepAlive key={String(url)} className="w-full h-full" url={url} />
</GroupPanelContainer>
);
};
GroupWebPanelRender.displayName = 'GroupWebPanelRender';
Expand Down
4 changes: 1 addition & 3 deletions client/web/src/components/Panel/group/MembersPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { Icon } from 'tailchat-design';
import { UserListItem } from '@/components/UserListItem';
import { Dropdown, Input, MenuProps, Skeleton } from 'antd';
import { Dropdown, Input, Skeleton } from 'antd';
import React, { useMemo } from 'react';
import {
getGroupConfigWithInfo,
PERMISSION,
t,
useCachedOnlineStatus,
useGroupInfo,
useHasGroupPermission,
UserBaseInfo,
} from 'tailchat-shared';
import { Problem } from '@/components/Problem';
Expand Down

0 comments on commit 3b7973e

Please sign in to comment.