mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-18 14:01:44 +03:00
fix: add message after link copied, fixed #131
This commit is contained in:
parent
4dd76949c4
commit
52a59d8dfd
@ -1,4 +1,5 @@
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { message } from '@toeverything/components/ui';
|
||||
import { useSettingFlags, type SettingFlags } from './use-setting-flags';
|
||||
import { copyToClipboard } from '@toeverything/utils';
|
||||
import {
|
||||
@ -91,7 +92,10 @@ export const useSettings = (): SettingItem[] => {
|
||||
{
|
||||
type: 'button',
|
||||
name: 'Copy Page Link',
|
||||
onClick: () => copyToClipboard(window.location.href),
|
||||
onClick: () => {
|
||||
copyToClipboard(window.location.href);
|
||||
message.success('Page link copied successfully');
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
|
Loading…
Reference in New Issue
Block a user