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:
Patrick Fic
2019-12-12 12:23:31 -08:00
parent f6c62da40a
commit bca375251e
9 changed files with 266 additions and 42 deletions

View File

@@ -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>
);
}