From 314ff9c134e898bcf42e277618ec813969ab84f9 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sat, 22 Aug 2020 01:03:20 +0300
Subject: refactor: use React.Children.only for wrappers

---
 src/components/AttachLink/AttachLink.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/AttachLink/AttachLink.tsx')

diff --git a/src/components/AttachLink/AttachLink.tsx b/src/components/AttachLink/AttachLink.tsx
index e73f5c1..742ba65 100644
--- a/src/components/AttachLink/AttachLink.tsx
+++ b/src/components/AttachLink/AttachLink.tsx
@@ -25,7 +25,7 @@ const AttachLink: React.FC<PropTypes> = ({ callback, children }) => {
     </Button>
   );
 
-  const child = children && React.Children.toArray(children)[0];
+  const child = children && React.Children.only(children);
 
   return (
     <>
-- 
cgit v1.2.3

