Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Refactor Searchbar to Typescript and make it functional #418

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/src/modules/Globals/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

export default function Navbar({ userInput }: NavbarProps) {
const [isLoggedIn, token, netId, signIn, signOut] = useAuthOptionalLogin()

Check warning on line 30 in client/src/modules/Globals/Navbar.tsx

View workflow job for this annotation

GitHub Actions / build

'token' is assigned a value but never used
const location = useLocation()

const profilePicture = randomPicture(netId)
Expand Down Expand Up @@ -78,6 +78,9 @@
userInput={userInput}
contrastingResultsBackground={true}
isInNavbar={true}
imgSrc={netId}
signOut={signOut}
isLoggedIn={isLoggedIn}
/>
</div>
{displayButton()}
Expand Down
7 changes: 4 additions & 3 deletions client/src/modules/Home/Components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
import '../home.css'

/**
Home Page.
Home Page.

Uppermost View component in the component tree, the first element of the HTML body tag grabbed by index.html.

@returns the application homepage with a navbar and searchbar, popular
classes and recent reviews components.

@param imgSrc for search bar

*/
export const Home = (imgSrc: any) => {
const [isLoggedIn, token, netId, signIn, signOut] = useAuthOptionalLogin()

Check warning on line 25 in client/src/modules/Home/Components/Home.tsx

View workflow job for this annotation

GitHub Actions / build

'token' is assigned a value but never used
const [DTILogo, setDTILogo] = useState(DTITextLogo)
const [season, setSeason] = useState('winter')
const [time, setTime] = useState('afternoon')
Expand Down Expand Up @@ -113,6 +113,7 @@
imgSrc={`${String(imgSrc.imgSrc)}`}
signOut={signOut}
isLoggedIn={isLoggedIn}
isInNavbar={false}
/>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion client/src/modules/SearchBar/Components/Course.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type Props = {
active: boolean
enter: number
mouse: number
handler: Function
key?: string
}

Expand Down
Loading
Loading