-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add Cache and Server Cards to Map #1947
Conversation
- Add more data onClick to the map server components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, few things could be done to further improve!
<InformationSpan name={'URL'} value={server.url} /> | ||
<InformationSpan | ||
name={'Longitude'} | ||
value={server.longitude.toString()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember from my React class that in JSX, React can automatically convert numbers to strings when rendering them. So toString()
here and the one on line 30 can be waived.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it does but I have the InformationSpan typed like so.
export const InformationSpan = ({
name,
value,
indent = 0,
}: {
name: string;
value: string;
indent?: number;
}) => {
So I just cast it to pass the type check. To be fair I could accept quite a few more values and have more lenient typing I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Redacted to prevent scope creep (This is ready, but I would like to tack on a couple items before merge and need the director data to work first)
#1778