Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): patch local dev run, without proxy #585

Merged
merged 3 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@
"insights": {
"appname": "subscriptions"
},
"browserslist": [],
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"jest": {
"coverageThreshold": {
"global": {
Expand Down
7 changes: 7 additions & 0 deletions scripts/dev.chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ buildChrome()
printf "\n${GREEN}Build SUCCESS${NOCOLOR}"
fi

if [ ! -d $DIR_REPO/build ]; then
printf "\n${YELLOW}Build output failed, confirm recent chroming updates didn't alter the output directory.${NOCOLOR}\n"
exit 0
else
printf "\n${GREEN}Build SUCCESS${NOCOLOR}"
fi

printf "\n${YELLOW}Setting up local chrome ...${NOCOLOR}"

mkdir -p $DIR_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ exports[`GuestsList Component should handle multiple display states: paged pendi
Object {
"borders": false,
"colCount": 1,
"colWidth": Array [],
"rowCount": 0,
"variant": "compact",
}
Expand Down
1 change: 1 addition & 0 deletions src/components/guestsList/guestsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class GuestsList extends React.Component {
tableProps={{
borders: false,
colCount: filterGuestsData?.length || (listData?.[0] && Object.keys(listData[0]).length) || 1,
colWidth: (filterGuestsData?.length && filterGuestsData.map(({ cellWidth }) => cellWidth)) || [],
rowCount: 0,
variant: TableVariant.compact
}}
Expand Down
7 changes: 4 additions & 3 deletions src/components/table/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class Table extends React.Component {
}

cells.forEach(cell => {
if (cell.title !== undefined) {
if (cell?.title !== undefined) {
const { title, ...settings } = cell;
rowObj.cells.push({ title, ...settings });
} else {
Expand All @@ -196,7 +196,7 @@ class Table extends React.Component {
});

columnHeaders.forEach((columnHeader, index) => {
if (columnHeader.title !== undefined) {
if (columnHeader?.title !== undefined) {
const { onSort, sortActive, sortDirection, title, ...settings } = columnHeader;
const tempColumnHeader = {
title,
Expand Down Expand Up @@ -339,8 +339,9 @@ Table.propTypes = {
cells: PropTypes.arrayOf(
PropTypes.oneOfType([
PropTypes.node,
PropTypes.instanceOf(Date),
PropTypes.shape({
title: PropTypes.node.isRequired
title: PropTypes.oneOfType([PropTypes.node, PropTypes.instanceOf(Date)]).isRequired
})
])
),
Expand Down