mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 10:52:16 +03:00
19 lines
354 B
JavaScript
19 lines
354 B
JavaScript
import { Clipboard } from 'react-native';
|
|
|
|
const readFromClipboard = async () => {
|
|
const clipboardContent = await Clipboard.getString();
|
|
return clipboardContent;
|
|
};
|
|
|
|
const writeToClipboard = async (text) => {
|
|
if (!text) {
|
|
return false;
|
|
}
|
|
|
|
await Clipboard.setString(text);
|
|
|
|
return true;
|
|
};
|
|
|
|
export { writeToClipboard, readFromClipboard };
|