refactor(frontend): clean up code by consolidating multi-line JSX into single lines where feasible
- Refactored JSX elements to improve readability by collapsing multi-line props and attributes into single lines if their length permits. - Improved consistency in component imports by grouping and consolidating them. - No functional changes, purely restructuring for clarity and maintainability.
This commit is contained in:
@@ -20,11 +20,7 @@ interface ActivityTimelineProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function ActivityTimeline({
|
||||
activities,
|
||||
onAddComment,
|
||||
className,
|
||||
}: ActivityTimelineProps) {
|
||||
export function ActivityTimeline({ activities, onAddComment, className }: ActivityTimelineProps) {
|
||||
return (
|
||||
<Card className={className}>
|
||||
<CardHeader>
|
||||
@@ -43,11 +39,7 @@ export function ActivityTimeline({
|
||||
<CardContent>
|
||||
<div className="space-y-6" role="list" aria-label="Issue activity">
|
||||
{activities.map((item, index) => (
|
||||
<div
|
||||
key={item.id}
|
||||
className="flex gap-4"
|
||||
role="listitem"
|
||||
>
|
||||
<div key={item.id} className="flex gap-4" role="listitem">
|
||||
<div className="relative flex flex-col items-center">
|
||||
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-muted">
|
||||
{item.actor.type === 'agent' ? (
|
||||
@@ -74,9 +66,7 @@ export function ActivityTimeline({
|
||||
</div>
|
||||
|
||||
{activities.length === 0 && (
|
||||
<div className="py-8 text-center text-muted-foreground">
|
||||
No activity yet
|
||||
</div>
|
||||
<div className="py-8 text-center text-muted-foreground">No activity yet</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user