Skip to content

Commit

Permalink
Remove truncateTitle
Browse files Browse the repository at this point in the history
Signed-off-by: Sauradip Ghosh <[email protected]>
  • Loading branch information
Sauradip07 committed Sep 9, 2024
1 parent 39b480b commit 2569896
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/frontend/components/history-data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const historyData = [
{
id: 1,
title: 'What is hyperledge...'
title: 'What is hyperledger fabric'
},
{
id: 2,
Expand Down
8 changes: 2 additions & 6 deletions src/frontend/components/sidebar-history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ const SidebarHistory = (props: Props) => {
}));
};

const truncateTitle = (title: string) => {
return title.length > 17
? title.slice(0, 17) + '...'
: title;
};


return (
<div className="mt-10">
Expand All @@ -61,7 +57,7 @@ const SidebarHistory = (props: Props) => {
className="flex justify-between mt-1 p-3 border-none rounded-lg font-semibold bg-slate-800 hover:bg-slate-800 cursor-pointer"
>
<span className="my-auto truncate overflow-hidden whitespace-nowrap">
{truncateTitle(item.title)}
{item.title}
</span>

<button>
Expand Down

0 comments on commit 2569896

Please sign in to comment.