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

feat: conditionally render schedule link in StopPane component #195

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
21 changes: 12 additions & 9 deletions src/components/stops/StopPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,18 @@
{#if routeShortNames()}
<h2 class="h2 mb-0 text-white">{$t('routes')}: {routeShortNames().join(', ')}</h2>
{/if}
<div class="mt-auto flex justify-end">
<a
href={`/stops/${stop.id}/schedule`}
class="inline-block rounded-lg border border-brand bg-brand px-3 py-1 text-sm font-medium text-white shadow-md transition duration-200 ease-in-out hover:bg-brand-secondary"
target="_blank"
>
{$t('schedule_for_stop.view_schedule')}
</a>
</div>

{#if tripSelected}
<div class="mt-auto flex justify-end">
<a
href={`/stops/${stop.id}/schedule`}
class="inline-block rounded-lg border border-brand bg-brand px-3 py-1 text-sm font-medium text-white shadow-md transition duration-200 ease-in-out hover:bg-brand-secondary"
target="_blank"
>
{$t('schedule_for_stop.view_schedule')}
</a>
</div>
{/if}
</div>
</div>

Expand Down