perf: 会话页面: 短链接按钮
parent
552bcf8356
commit
96a050afa9
@ -0,0 +1,24 @@
|
||||
import { createContext, useEffect, useState } from 'react'
|
||||
import { Tooltip, Button } from 'antd'
|
||||
import useUrlStore from '@/stores/UrlStore'
|
||||
|
||||
const ShortlinkBtn = ({ type, ...props }) => {
|
||||
const [openShorturlDrawer] = useUrlStore((state) => [state.openDrawer])
|
||||
|
||||
return (
|
||||
<>
|
||||
<Tooltip title='短链接'>
|
||||
{type === 'link' ? (
|
||||
<Button type={'link'} onClick={() => openShorturlDrawer()}>
|
||||
短链接
|
||||
</Button>
|
||||
) : (
|
||||
<Button type='text' onClick={() => openShorturlDrawer()} size={'middle'} className='px-1'>
|
||||
🔗
|
||||
</Button>
|
||||
)}
|
||||
</Tooltip>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default ShortlinkBtn
|
||||
Loading…
Reference in New Issue