Timeline - Link to subs

This commit is contained in:
John Groszko 2026-04-23 16:36:38 -05:00
parent cfccd424cb
commit 2089ee4161

View file

@ -14,6 +14,7 @@ import {
IconLock,
IconX,
} from "@tabler/icons-react";
import { useUserContext } from "./UserContext";
const TIMELINE_TYPE = {
ORDER_NOT_ISSUED: {
@ -60,7 +61,10 @@ const TIMELINE_TYPE = {
export const TimelineList: React.FC<{
timeline: TimelineEvent[];
}> = ({ timeline }) => (
}> = ({ timeline }) => {
const { username: my_username } = useUserContext();
return (
<Box>
<Title order={1} mb="lg">
Timeline
@ -115,7 +119,15 @@ export const TimelineList: React.FC<{
</Text>
) : null}
<Text size="xs">
{username != my_username ? (
<Anchor component={Link} to={`/orders/${username}`}>
<IconLock size="0.75rem" /> {username}
</Anchor>
) : (
<>
<IconLock size="0.75rem" /> {username}
</>
)}
</Text>
<Text size="xs">{moment(updated_at).fromNow()}</Text>
</Flex>
@ -125,4 +137,5 @@ export const TimelineList: React.FC<{
</Timeline>
</Card>
</Box>
);
);
};