Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
k2xl committed Jun 27, 2024
1 parent eb0282d commit 2af98c5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion components/page/multiSelectUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function MultiSelectUser({ className, controlStyles, defaultValue
cursor: 'text',
height: 42,
maxWidth: '100%',
minWidth: '13rem',
minWidth: '160px',
'&:hover': {
borderColor: undefined,
},
Expand Down
31 changes: 18 additions & 13 deletions pages/[subdomain]/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -623,26 +623,31 @@ export default function Search({ enrichedLevels, reqUser, searchAuthor, searchQu

const subHeaderComponent = (
<div className='flex flex-col items-center gap-1 p-1' id='level_search_box'>
<form className='flex flex-wrap items-center justify-center z-10 gap-1' onSubmit={(e) => {
<form className='flex flex-col items-center justify-center z-10 gap-1' onSubmit={(e) => {
e.preventDefault();
const searchInput = document.getElementById('default-search') as HTMLInputElement;

queryHelper({
search: searchInput.value,
});
}}>
<input
id='default-search'
key='search-level-input'
placeholder='Search level name...'
type='search'
defaultValue={query.search}
/>
<MultiSelectUser key={'search-author-input-' + searchAuthor?._id.toString()} placeholder='Search authors...' defaultValue={searchAuthor} onSelect={(user) => {
queryHelper({
searchAuthor: user?.name || '',
});
}} />
<div className='flex flex-row gap-1 justify-center'>
<input
id='default-search'
key='search-level-input'
placeholder='Search level...'
type='search'
defaultValue={query.search}
style={{
width: '160px',
}}
/>
<MultiSelectUser key={'search-author-input-' + searchAuthor?._id.toString()} placeholder='Search author...' defaultValue={searchAuthor} onSelect={(user) => {
queryHelper({
searchAuthor: user?.name || '',
});
}} />
</div>
<button type='submit' disabled={loading}
className={blueButton}>Search</button>
</form>
Expand Down

0 comments on commit 2af98c5

Please sign in to comment.