Skip to content

Commit

Permalink
small changes based on inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiramTadepalli committed Nov 19, 2024
1 parent 357a222 commit 25280ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
10 changes: 0 additions & 10 deletions src/components/common/SearchBar/searchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,6 @@ const SearchBar = ({
}
}

//returns results on enter
function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
if (event.key === 'Enter' && inputValue === '') {
event.preventDefault();
event.stopPropagation();
onSelect_internal(value);
}
}

useEffect(() => {
fetch('/api/autocomplete');
}, []);
Expand Down Expand Up @@ -242,7 +233,6 @@ const SearchBar = ({
loadNewOptions(newInputValue);
}}
renderInput={(params) => {
params.inputProps.onKeyDown = handleKeyDown;
return (
<TextField
{...params}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ function MyApp({ Component, pageProps }: AppProps) {
<>
<GoogleAnalytics gaId="G-CC86XR1562" />
<Head>
<title>UTD Trends</title>
<meta key="og:title" property="og:title" content="UTD Trends" />
<title>UTD TRENDS</title>
<meta key="og:title" property="og:title" content="UTD TRENDS" />
<link
rel="icon"
type="image/png"
Expand Down
13 changes: 2 additions & 11 deletions src/pages/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,7 @@ export const Dashboard: NextPage = () => {
professors.map((term) => {
pageTitle += searchQueryLabel(term) + ', ';
});
pageTitle =
pageTitle.lastIndexOf(', ') === pageTitle.length - 2
? pageTitle.substring(0, pageTitle.lastIndexOf(', ')) + ' - '
: pageTitle;
pageTitle = pageTitle.slice(0, -2) + (pageTitle.length > 0 ? ' - ' : '');

/* Final page */

Expand All @@ -824,13 +821,7 @@ export const Dashboard: NextPage = () => {
<meta
key="og:title"
property="og:title"
content={
'Results - ' +
(router.query.searchTerms as string[])
.map((el) => decodeSearchQueryLabel(el))
.join(', ') +
'UTD TRENDS'
}
content={'Results - ' + pageTitle + 'UTD TRENDS'}
/>
<meta
property="og:url"
Expand Down

0 comments on commit 25280ab

Please sign in to comment.