aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Header.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-31 22:48:30 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit8887e1b51565b992f34c955c459125eb85b28483 (patch)
tree7fc8130f523014864e2d60aa9628e7a7ee7e7dd5 /vnext/src/ui/Header.js
parentfc96a9a206a825171da87a7f23cc2ea16b1d645d (diff)
`useVisitor` hook
Diffstat (limited to 'vnext/src/ui/Header.js')
-rw-r--r--vnext/src/ui/Header.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/vnext/src/ui/Header.js b/vnext/src/ui/Header.js
index 3162c9ea..db8959ea 100644
--- a/vnext/src/ui/Header.js
+++ b/vnext/src/ui/Header.js
@@ -4,8 +4,10 @@ import { Link, useNavigate } from 'react-router-dom';
import Icon from './Icon';
import { UserLink } from './UserInfo';
import SearchBox from './SearchBox';
+import { useVisitor } from './VisitorContext';
-function Header({ visitor, className }) {
+function Header() {
+ const [visitor] = useVisitor();
const navigate = useNavigate();
/**
* @param {string} searchString
@@ -17,7 +19,7 @@ function Header({ visitor, className }) {
navigate(location);
}, [navigate]);
return (
- <div id="header" className={className}>
+ <div id="header">
<div id="header_wrapper">
{
visitor.uid < 0 ?