feat: upgrade minor and bug versions of dependencies

This commit is contained in:
dennis.ludwig
2021-09-28 10:49:53 +02:00
parent bce561a0ac
commit 8614314b00
5 changed files with 52 additions and 55 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
yarn lint-staged && yarn build:scripts yarn ts:check && yarn lint-staged && yarn build:scripts

View File

@@ -1,6 +1,6 @@
module.exports = { module.exports = {
"*.{json, md, yml, scss}": ["prettier --write"], "*.{json,md,yml,scss}": ["prettier --write"],
"*.{js, ts, tsx}": [ "*.{js,ts,tsx}": [
"eslint", "eslint",
"prettier --write", "prettier --write",
"react-scripts test --watchAll=false --findRelatedTests", "react-scripts test --watchAll=false --findRelatedTests",

View File

@@ -8,6 +8,6 @@ describe("Item", () => {
it("Should render the item", () => { it("Should render the item", () => {
render(<Item item={testItem} />, { wrapper: MemoryRouter }); render(<Item item={testItem} />, { wrapper: MemoryRouter });
expect(screen.queryByText(testItem.title)).not.toBeInTheDocument(); expect(screen.queryByText(testItem.title)).toBeInTheDocument();
}); });
}); });

View File

@@ -20,24 +20,24 @@ const Item: React.FC<Props> = ({
style = {}, style = {},
greyedOut = false, greyedOut = false,
}) => ( }) => (
// <Link <Link
// className={classNames("item", { className={classNames("item", {
// "item--no-leading-border": noLeadingBorder, "item--no-leading-border": noLeadingBorder,
// "is-active": active, "is-active": active,
// })} })}
// pageName={`${item.quadrant}/${item.name}`} pageName={`${item.quadrant}/${item.name}`}
// style={style} style={style}
// > >
// <div <div
// className={classNames("item__title", { className={classNames("item__title", {
// "greyed-out": greyedOut, "greyed-out": greyedOut,
// })} })}
// > >
// {item.title} {item.title}
// <Flag item={item} /> <Flag item={item} />
// </div> </div>
// {item.info && <div className="item__info">{item.info}</div>} {item.info && <div className="item__info">{item.info}</div>}
// </Link> </Link>
); );
export default Item; export default Item;

View File

@@ -1,10 +1,6 @@
import React from "react"; import React from "react";
import Item from "../Item/Item"; import Item from "../Item/Item";
import { import { featuredOnly, nonFeaturedOnly, Item as mItem } from "../../model";
featuredOnly,
nonFeaturedOnly,
Item as mItem,
} from "../../model";
import "./item-list.scss"; import "./item-list.scss";
type ItemListProps = { type ItemListProps = {
@@ -27,33 +23,34 @@ const ItemList: React.FC<ItemListProps> = ({
const nonFeaturedItems = nonFeaturedOnly(items); const nonFeaturedItems = nonFeaturedOnly(items);
return ( return (
<div className="item-list"> <div className="item-list">
<div className="item-list__header" style={headerStyle}> <div className="item-list__header" style={headerStyle}>
{children} {children}
</div>
<div className="item-list__list">
{featuredItems.map((item, i) => (
<Item
key={item.name}
item={item}
noLeadingBorder={noLeadingBorder}
active={activeItem?.name === item.name}
style={itemStyle[i]}
greyedOut={false}
/>
))}
{nonFeaturedItems.map((item, i) => (
<Item
key={item.name}
item={item}
noLeadingBorder={noLeadingBorder}
active={activeItem?.name === item.name}
style={itemStyle[featuredItems.length + i]}
greyedOut={true}
/>
))}
</div>
</div> </div>
<div className="item-list__list"> );
{featuredItems.map((item, i) => ( };
// <Item
// key={item.name}
// item={item}
// noLeadingBorder={noLeadingBorder}
// active={activeItem?.name === item.name}
// style={itemStyle[i]}
// greyedOut={false}
// />
))}
{nonFeaturedItems.map((item, i) => (
<Item
key={item.name}
item={item}
noLeadingBorder={noLeadingBorder}
active={activeItem?.name === item.name}
style={itemStyle[featuredItems.length + i]}
greyedOut={true}
/>
))}
</div>
</div>
);}
export default ItemList; export default ItemList;