Skip to content

Commit

Permalink
feat: make queue title as a link
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Apr 23, 2023
1 parent 9b07bb2 commit 945d35a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/ui/src/components/QueueCard/QueueCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
flex-direction: column;
gap: 0.5rem;
}

.link {
color: inherit;
text-decoration: none;
}
7 changes: 6 additions & 1 deletion packages/ui/src/components/QueueCard/QueueCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AppQueue } from '@bull-board/api/dist/typings/app';
import React from 'react';
import { NavLink } from 'react-router-dom';
import { Card } from '../Card/Card';
import { QueueStats } from './QueueStats/QueueStats';
import s from './QueueCard.module.css';
Expand All @@ -10,7 +11,11 @@ interface IQueueCardProps {

export const QueueCard = ({ queue }: IQueueCardProps) => (
<Card className={s.queueCard}>
<div>{queue.name}</div>
<div>
<NavLink to={`/queue/${encodeURIComponent(queue.name)}`} className={s.link}>
{queue.name}
</NavLink>
</div>
<QueueStats queue={queue} />
</Card>
);

0 comments on commit 945d35a

Please sign in to comment.