feat: categories and popups #171
@ -1100,23 +1100,14 @@ export const CategoryAutocomplete = ({
|
||||
{Row}
|
||||
</VariableSizeList>
|
||||
) : (
|
||||
<FixedSizeList
|
||||
height={500}
|
||||
width={'100%'}
|
||||
itemCount={1}
|
||||
itemSize={35}
|
||||
>
|
||||
{({ index, style }) => (
|
||||
<div
|
||||
style={style}
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
onClick={handleAddNew}
|
||||
>
|
||||
{inputValue &&
|
||||
!filteredOptions?.find(
|
||||
(option) =>
|
||||
option.hierarchy.toLowerCase() ===
|
||||
inputValue.toLowerCase()
|
||||
option.hierarchy.toLowerCase() === inputValue.toLowerCase()
|
||||
) ? (
|
||||
<>
|
||||
Add "{inputValue}"
|
||||
@ -1137,8 +1128,6 @@ export const CategoryAutocomplete = ({
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</FixedSizeList>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1147,9 +1136,11 @@ export const CategoryAutocomplete = ({
|
||||
{LTags.map((hierarchy) => {
|
||||
const heirarchicalCategories = hierarchy.split(`:`)
|
||||
const categories = heirarchicalCategories
|
||||
.map<React.ReactNode>((c, i) => (
|
||||
.map<React.ReactNode>((c, i) =>
|
||||
game ? (
|
||||
<Link
|
||||
key={`category-${i}`}
|
||||
target='_blank'
|
||||
to={{
|
||||
pathname: getGamePageRoute(game),
|
||||
search: `l=${c}`
|
||||
@ -1158,7 +1149,12 @@ export const CategoryAutocomplete = ({
|
||||
>
|
||||
<p>{capitalizeEachWord(c)}</p>
|
||||
</Link>
|
||||
))
|
||||
) : (
|
||||
<p className='IBMSMSMBSSCategoriesBoxItem'>
|
||||
{capitalizeEachWord(c)}
|
||||
</p>
|
||||
)
|
||||
)
|
||||
.reduce((prev, curr, i) => [
|
||||
prev,
|
||||
<div
|
||||
|
@ -548,6 +548,7 @@ const Body = ({
|
||||
.map<React.ReactNode>((c: string) => (
|
||||
<ReactRouterLink
|
||||
className='IBMSMSMBSSCategoriesBoxItem'
|
||||
target='_blank'
|
||||
to={{
|
||||
pathname: getGamePageRoute(game),
|
||||
search: `l=${c}`
|
||||
|
Loading…
x
Reference in New Issue
Block a user