(props: Props)
| 18 | } |
| 19 | |
| 20 | export default function DesktopNav(props: Props) { |
| 21 | const viewer = useFragment( |
| 22 | graphql` |
| 23 | fragment DesktopNav_viewer on User { |
| 24 | isGuest |
| 25 | ...UserDropdown_viewer |
| 26 | } |
| 27 | `, |
| 28 | props.viewer, |
| 29 | ) |
| 30 | |
| 31 | const isGuest = viewer.isGuest === undefined ? true : viewer.isGuest |
| 32 | |
| 33 | return ( |
| 34 | <header className="innerHeader px-sm-3 px-md-6 px-lg-4"> |
| 35 | <nav className="navLeft d-inline-block"> |
| 36 | <h1 className="h3 text-normal"> |
| 37 | <a |
| 38 | href="/" |
| 39 | className="primaryLogo n-link no-underline d-flex" |
| 40 | > |
| 41 | <div className="logo-container mr-2"> |
| 42 | <DigraphLogo height="28px" width="28px" fill="#000" /> |
| 43 | </div> |
| 44 | |
| 45 | Digraph |
| 46 | </a> |
| 47 | </h1> |
| 48 | </nav> |
| 49 | <div className="searchBox"> |
| 50 | <SearchBox router={props.router} location={props.location} view={props.view} /> |
| 51 | </div> |
| 52 | <nav className="userNav"> |
| 53 | <a |
| 54 | className="Link--primary px-2" |
| 55 | href="https://blog.digraph.app" |
| 56 | > |
| 57 | Blog |
| 58 | </a> |
| 59 | <Link |
| 60 | className="Link--primary px-2" |
| 61 | id="recent-activity" |
| 62 | to="/recent" |
| 63 | > |
| 64 | Recent |
| 65 | </Link> |
| 66 | <Link |
| 67 | className="Link--primary px-2" |
| 68 | to={toEverything} |
| 69 | > |
| 70 | Everything |
| 71 | </Link> |
| 72 | {isGuest |
| 73 | ? <SignIn /> |
| 74 | : <UserNav viewer={viewer} />} |
| 75 | </nav> |
| 76 | </header> |
| 77 | ) |
nothing calls this directly
no outgoing calls
no test coverage detected