mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-19 18:31:55 +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 { useNavigate } from 'react-router-dom';
|
||||||
|
import { message } from '@toeverything/components/ui';
|
||||||
import { useSettingFlags, type SettingFlags } from './use-setting-flags';
|
import { useSettingFlags, type SettingFlags } from './use-setting-flags';
|
||||||
import { copyToClipboard } from '@toeverything/utils';
|
import { copyToClipboard } from '@toeverything/utils';
|
||||||
import {
|
import {
|
||||||
@ -91,7 +92,10 @@ export const useSettings = (): SettingItem[] => {
|
|||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
name: 'Copy Page Link',
|
name: 'Copy Page Link',
|
||||||
onClick: () => copyToClipboard(window.location.href),
|
onClick: () => {
|
||||||
|
copyToClipboard(window.location.href);
|
||||||
|
message.success('Page link copied successfully');
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
|
Loading…
Reference in New Issue
Block a user