Skip to content

Commit

Permalink
feat(fe): ⚡ active sidebar when in task logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lehuygiang28 committed Jun 19, 2024
1 parent bed3868 commit 2bbe2b8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
34 changes: 21 additions & 13 deletions apps/fe/src/app/(auth)/tasks/logs/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,27 @@ export default function LogList() {

return (
<>
<Breadcrumb>
<Breadcrumb.Item>
<Link href="/tasks">Tasks</Link>
</Breadcrumb.Item>
<Breadcrumb.Item>
<Link href={`/tasks/show/${pathname?.replace(/\/$/, '')?.split('/')?.pop()}`}>
Show
</Link>
</Breadcrumb.Item>
<Breadcrumb.Item>Task Logs</Breadcrumb.Item>
<Breadcrumb.Item>{pathname?.replace(/\/$/, '')?.split('/')?.pop()}</Breadcrumb.Item>
</Breadcrumb>
<List>
<List
title="Task Logs"
breadcrumb={
<Breadcrumb>
<Breadcrumb.Item>
<Link href="/tasks">Tasks</Link>
</Breadcrumb.Item>
<Breadcrumb.Item>
<Link
href={`/tasks/show/${pathname?.replace(/\/$/, '')?.split('/')?.pop()}`}
>
Show
</Link>
</Breadcrumb.Item>
<Breadcrumb.Item>Task Logs</Breadcrumb.Item>
<Breadcrumb.Item>
{pathname?.replace(/\/$/, '')?.split('/')?.pop()}
</Breadcrumb.Item>
</Breadcrumb>
}
>
<Space direction="vertical" style={{ width: '100%' }}>
<Line
style={{ width: '100%', maxHeight: '500px' }}
Expand Down
1 change: 1 addition & 0 deletions apps/fe/src/app/_refine_context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const App = (props: React.PropsWithChildren<AppProps>) => {
create: '/tasks/create',
edit: '/tasks/edit/:id',
show: '/tasks/show/:id',
clone: '/tasks/logs/:id',
meta: {
canDelete: true,
icon: <ScheduleOutlined />,
Expand Down

0 comments on commit 2bbe2b8

Please sign in to comment.