Skip to content

Commit

Permalink
Migrate to TypeScript : components/Header/Header.js (COPS-IITBHU#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
shukapurv authored Sep 11, 2021
1 parent 2ea02ec commit 14596e9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions components/Header/Header.js → components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react"
import { useState, useEffect, ReactElement } from "react"
import { Button } from "atomize"
import { Spinner } from "react-bootstrap"
import { useAuth } from "../../context/auth"
import Link from "next/link"
import { HamburgerSpin } from "react-animated-burgers"

export default function Header() {
export default function Header(): ReactElement {
const { handleSignIn, handleLogout, token, profile, loading } = useAuth()
const [menu, setMenu] = React.useState(false)
const [menu, setMenu] = useState<boolean>(false)

React.useEffect(() => {
useEffect(() => {
if (profile && location.pathname != `/profile/${profile.username}`) {
const arr = [
profile.name,
Expand All @@ -29,13 +29,13 @@ export default function Header() {
return (
<div
className="position-fixed w-100 bg-white"
style={{ zIndex: "10", height: "88px" }}
style={{ zIndex: 10, height: "88px" }}
>
<div
className={`d-flex align-items-center justify-content-between w-100 h-100 p-3`}
>
<Link href="/">
<a className="text-dark">
<Link href="/" passHref>
<a href="/#" className="text-dark">
<div>
<span
style={{
Expand Down

0 comments on commit 14596e9

Please sign in to comment.