From 1870f3fdf43707a15fda0f609a021f516f45eb63 Mon Sep 17 00:00:00 2001
From: Piotr Russ <mail@pruss.it>
Date: Wed, 18 Nov 2020 23:15:38 +0100
Subject: finish auth routes, create cookie token, fix folder structure, add
 context to FE

---
 client/src/admin/hocs/WithHover.jsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 client/src/admin/hocs/WithHover.jsx

(limited to 'client/src/admin/hocs/WithHover.jsx')

diff --git a/client/src/admin/hocs/WithHover.jsx b/client/src/admin/hocs/WithHover.jsx
new file mode 100644
index 0000000..2a5cdcb
--- /dev/null
+++ b/client/src/admin/hocs/WithHover.jsx
@@ -0,0 +1,18 @@
+import React, {useContext} from 'react';
+import Context from '../context';
+
+
+const WithHover = ({ children, message, classes }) => {
+  const { setHover } = useContext(Context);
+  return (
+    <div
+      onMouseEnter={()=>setHover(message)}
+      onMouseLeave={()=>setHover(null)}
+      className={classes}
+    >
+      {children}
+    </div>
+  )
+};
+
+export default WithHover;
-- 
cgit v1.2.3

