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

PublicTransport: Add a tooltip to public transport lines #633

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

Dlurak
Copy link
Collaborator

@Dlurak Dlurak commented Oct 6, 2024

Description

Add a tooltip showing the route from the from, via and totags.

Copy link

vercel bot commented Oct 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview Oct 6, 2024 5:05pm

@Dlurak Dlurak enabled auto-merge (squash) October 6, 2024 17:03
@Dlurak Dlurak merged commit 6c823ef into zbycz:master Oct 6, 2024
2 checks passed
Comment on lines +29 to +32
const formatTags = (tags: Tags) => {
const parts = [tags.from, ...(tags.via ? [tags.via] : []), tags.to];
return parts.flatMap((str) => str.split(';')).join(' - ');
};
Copy link
Owner

Choose a reason for hiding this comment

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

If i understand this correctly, this function is pure, so it can be moved to the top-level. It is always better to use pure functions and also to move them to the top level, because the rest is better readable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it is pure. I absolutely love functional programming and try to do things pure whenever I can.

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.

2 participants