Fixed selected nav item. Added lazy loading for WS client to resolve token issue. Added some filtering to jobs list.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import React from "react";
|
||||
import { useQuery } from "react-apollo";
|
||||
import { Link } from "react-router-dom";
|
||||
import { GET_CURRENT_USER } from "../../graphql/local.queries";
|
||||
import { Icon } from "antd";
|
||||
|
||||
export default function ManageSignInButton() {
|
||||
const {
|
||||
loading,
|
||||
error,
|
||||
data: { currentUser }
|
||||
} = useQuery(GET_CURRENT_USER);
|
||||
|
||||
if (loading) return "MSI Loading";
|
||||
if (error) return error.message;
|
||||
console.log("currentUser", currentUser);
|
||||
return currentUser ? (
|
||||
<div>
|
||||
{" "}
|
||||
<Link to="/manage">
|
||||
<Icon type="build" />
|
||||
Manage
|
||||
</Link>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<Link to="/signin">
|
||||
<Icon type="login" />
|
||||
Sign In
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user