refactor: 调整Avatar组件引用方式

pull/90/head
moonrailgun 2 years ago
parent 0290a02905
commit ef88129462

@ -1,8 +1,8 @@
import { Avatar, AvatarProps } from '.'; import { Avatar, AvatarProps } from '.';
import React from 'react'; import React from 'react';
import _take from 'lodash/take'; import _take from 'lodash/take';
import './combined.css';
import { px2rem } from './utils'; import { px2rem } from './utils';
import './combined.css';
interface CombinedAvatarProps { interface CombinedAvatarProps {
shape?: 'circle' | 'square'; shape?: 'circle' | 'square';

@ -1,6 +0,0 @@
export {
/**
* @deprecated please import it from `tailchat-design`
*/
Avatar,
} from 'tailchat-design';

@ -9,11 +9,11 @@ import {
groupActions, groupActions,
} from 'tailchat-shared'; } from 'tailchat-shared';
import type { GroupPanel } from 'tailchat-shared'; import type { GroupPanel } from 'tailchat-shared';
import { Avatar } from '../Avatar';
import { closeModal, ModalWrapper } from '../Modal'; import { closeModal, ModalWrapper } from '../Modal';
import { Slides, SlidesRef } from '../Slides'; import { Slides, SlidesRef } from '../Slides';
import { useNavigate } from 'react-router'; import { useNavigate } from 'react-router';
import { applyDefaultFallbackGroupPermission } from 'tailchat-shared'; import { applyDefaultFallbackGroupPermission } from 'tailchat-shared';
import { Avatar } from 'tailchat-design';
const panelTemplate: { const panelTemplate: {
key: string; key: string;

@ -1,4 +1,3 @@
import { Avatar } from '@/components/Avatar';
import { AvatarUploader } from '@/components/AvatarUploader'; import { AvatarUploader } from '@/components/AvatarUploader';
import { FullModalCommonTitle } from '@/components/FullModal/CommonTitle'; import { FullModalCommonTitle } from '@/components/FullModal/CommonTitle';
import { import {
@ -7,6 +6,7 @@ import {
} from '@/components/FullModal/Field'; } from '@/components/FullModal/Field';
import { NoData } from '@/components/NoData'; import { NoData } from '@/components/NoData';
import React from 'react'; import React from 'react';
import { Avatar } from 'tailchat-design';
import { import {
modifyGroupField, modifyGroupField,
showToasts, showToasts,

@ -1,4 +1,3 @@
import { Avatar } from '@/components/Avatar';
import { Highlight } from '@/components/Highlight'; import { Highlight } from '@/components/Highlight';
import { Button, Divider, Empty, Typography } from 'antd'; import { Button, Divider, Empty, Typography } from 'antd';
import { import {
@ -14,6 +13,7 @@ import {
} from 'tailchat-shared'; } from 'tailchat-shared';
import React, { useCallback, useState } from 'react'; import React, { useCallback, useState } from 'react';
import _isNil from 'lodash/isNil'; import _isNil from 'lodash/isNil';
import { Avatar } from 'tailchat-design';
const SearchFriendResult: React.FC<{ const SearchFriendResult: React.FC<{
result: UserBaseInfo | undefined | null; result: UserBaseInfo | undefined | null;

@ -2,8 +2,8 @@ import React from 'react';
import { useLocation } from 'react-router'; import { useLocation } from 'react-router';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { Typography, Badge } from 'antd'; import { Typography, Badge } from 'antd';
import { Avatar } from '@/components/Avatar';
import clsx from 'clsx'; import clsx from 'clsx';
import { Avatar } from 'tailchat-design';
interface SidebarItemProps { interface SidebarItemProps {
name: string; name: string;

Loading…
Cancel
Save