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

Version 0.0.2 #45

Merged
merged 36 commits into from
Dec 1, 2021
Merged

Version 0.0.2 #45

merged 36 commits into from
Dec 1, 2021

Conversation

nhayfield
Copy link
Collaborator

@nhayfield nhayfield commented Oct 27, 2021

Most Done. Planning to merge it so we can do smaller prs

@nhayfield nhayfield marked this pull request as draft October 27, 2021 19:16
return (
<SvgIcon viewBox="0 0 20 20" className={classes.iconStyle}>
<path
d="M8.33317 3.3335H3.33317C2.4165 3.3335 1.67484 4.0835 1.67484 5.00016L1.6665 15.0002C1.6665 15.9168 2.4165 16.6668 3.33317 16.6668H16.6665C17.5832 16.6668 18.3332 15.9168 18.3332 15.0002V6.66683C18.3332 5.75016 17.5832 5.00016 16.6665 5.00016H9.99984L8.33317 3.3335Z"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did these svgs come from? Maybe add a comment if it came from a library?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no library. it is from the designer.

};

const saveTags = (arr: string[]): void => {
setTags(arr.map((tag) => formatTag(tag)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setTags(arr.map((tag) => formatTag(tag)));
setTags(arr.map(formatTag));

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup

Comment on lines 56 to 58
const [statuses, setStatuses] = useState(
{} as { [key: string]: ListenerStatus }
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const [statuses, setStatuses] = useState(
{} as { [key: string]: ListenerStatus }
);
const [statuses, setStatuses] = useState<Record<string, ListenerStatus>>({});

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup had copy pasted from the generated code

const [statuses, setStatuses] = useState(
{} as { [key: string]: ListenerStatus }
);
const [error, setError] = useState(null as ServiceError | null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think explicitly setting the generic type would be clearer in this case.

Suggested change
const [error, setError] = useState(null as ServiceError | null);
const [error, setError] = useState<ServiceError>(null);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it complains unless i do this:
const [error, setError] = useState<ServiceError | null>(null);

@nhayfield nhayfield marked this pull request as ready for review December 1, 2021 17:15
@nhayfield nhayfield merged commit 747f81f into master Dec 1, 2021
@nhayfield nhayfield deleted the version_0.0.2 branch December 1, 2021 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants