-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change attestations sort by date logic and small fixes (#476)
Co-authored-by: Taras Oliynyk <taras.oliynyk@hapi.one>
- Loading branch information
1 parent
082b63c
commit f4e9c81
Showing
10 changed files
with
76 additions
and
60 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
explorer/src/components/DataTable/components/TdHandler/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ChevronRight } from "lucide-react"; | ||
|
||
import { Link } from "@/components/Link"; | ||
|
||
import { ITdHandler } from "./interface"; | ||
|
||
export const TdHandler: React.FC<ITdHandler> = ({ value, valueUrl, to, isTextLeft = false }) => { | ||
return ( | ||
<div className="flex items-center justify-end gap-2"> | ||
{valueUrl ? ( | ||
<a | ||
href={valueUrl} | ||
target="_blank" | ||
className={`hover:underline hover:text-text-quaternary ${isTextLeft ? "translate-x-0" : "translate-x-5"} ${ | ||
isTextLeft ? "group-hover:translate-x-5" : "group-hover:translate-x-0" | ||
} transition max-w-[300px] overflow-hidden text-ellipsis`} | ||
> | ||
{value} | ||
</a> | ||
) : ( | ||
<p | ||
className={`w-full text-${isTextLeft ? "left" : "right"} ${isTextLeft ? "translate-x-0" : "translate-x-5"} ${ | ||
isTextLeft ? "group-hover:-translate-x-5" : "group-hover:translate-x-0" | ||
} transition max-w-[300px] overflow-hidden text-ellipsis`} | ||
> | ||
{value} | ||
</p> | ||
)} | ||
<Link to={to}> | ||
<ChevronRight className="w-5 opacity-0 group-hover:opacity-100 transition" /> | ||
</Link> | ||
</div> | ||
); | ||
}; |
6 changes: 6 additions & 0 deletions
6
explorer/src/components/DataTable/components/TdHandler/interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface ITdHandler { | ||
to: string; | ||
value: string; | ||
valueUrl?: string; | ||
isTextLeft?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters