feat: upgrade minor and bug versions of dependencies
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn lint-staged && yarn build:scripts
|
||||
yarn ts:check && yarn lint-staged && yarn build:scripts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
"*.{json, md, yml, scss}": ["prettier --write"],
|
||||
"*.{js, ts, tsx}": [
|
||||
"*.{json,md,yml,scss}": ["prettier --write"],
|
||||
"*.{js,ts,tsx}": [
|
||||
"eslint",
|
||||
"prettier --write",
|
||||
"react-scripts test --watchAll=false --findRelatedTests",
|
||||
|
||||
@@ -8,6 +8,6 @@ describe("Item", () => {
|
||||
it("Should render the item", () => {
|
||||
render(<Item item={testItem} />, { wrapper: MemoryRouter });
|
||||
|
||||
expect(screen.queryByText(testItem.title)).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(testItem.title)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -20,24 +20,24 @@ const Item: React.FC<Props> = ({
|
||||
style = {},
|
||||
greyedOut = false,
|
||||
}) => (
|
||||
// <Link
|
||||
// className={classNames("item", {
|
||||
// "item--no-leading-border": noLeadingBorder,
|
||||
// "is-active": active,
|
||||
// })}
|
||||
// pageName={`${item.quadrant}/${item.name}`}
|
||||
// style={style}
|
||||
// >
|
||||
// <div
|
||||
// className={classNames("item__title", {
|
||||
// "greyed-out": greyedOut,
|
||||
// })}
|
||||
// >
|
||||
// {item.title}
|
||||
// <Flag item={item} />
|
||||
// </div>
|
||||
// {item.info && <div className="item__info">{item.info}</div>}
|
||||
// </Link>
|
||||
<Link
|
||||
className={classNames("item", {
|
||||
"item--no-leading-border": noLeadingBorder,
|
||||
"is-active": active,
|
||||
})}
|
||||
pageName={`${item.quadrant}/${item.name}`}
|
||||
style={style}
|
||||
>
|
||||
<div
|
||||
className={classNames("item__title", {
|
||||
"greyed-out": greyedOut,
|
||||
})}
|
||||
>
|
||||
{item.title}
|
||||
<Flag item={item} />
|
||||
</div>
|
||||
{item.info && <div className="item__info">{item.info}</div>}
|
||||
</Link>
|
||||
);
|
||||
|
||||
export default Item;
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import React from "react";
|
||||
import Item from "../Item/Item";
|
||||
import {
|
||||
featuredOnly,
|
||||
nonFeaturedOnly,
|
||||
Item as mItem,
|
||||
} from "../../model";
|
||||
import { featuredOnly, nonFeaturedOnly, Item as mItem } from "../../model";
|
||||
import "./item-list.scss";
|
||||
|
||||
type ItemListProps = {
|
||||
@@ -25,35 +21,36 @@ const ItemList: React.FC<ItemListProps> = ({
|
||||
}) => {
|
||||
const featuredItems = featuredOnly(items);
|
||||
const nonFeaturedItems = nonFeaturedOnly(items);
|
||||
|
||||
|
||||
return (
|
||||
<div className="item-list">
|
||||
<div className="item-list__header" style={headerStyle}>
|
||||
{children}
|
||||
<div className="item-list">
|
||||
<div className="item-list__header" style={headerStyle}>
|
||||
{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 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;
|
||||
|
||||
Reference in New Issue
Block a user