Skip to content

Commit 0a2186b

Browse files
committed
refactor(recent-feedback): update responsive design
1 parent 985f867 commit 0a2186b

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

src/components/dashboard/FeedbackSection/FeedbackSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
import { Stack, Text } from "@omnidev/sigil";
44

5-
import type { FlexProps } from "@omnidev/sigil";
5+
import type { FlexProps, StackProps } from "@omnidev/sigil";
66

77
interface Props extends FlexProps {
88
/** Section title. */
99
title: string;
1010
/** Props to pass to the main content container. */
11-
contentProps?: FlexProps;
11+
contentProps?: StackProps;
1212
}
1313

1414
/**

src/components/dashboard/RecentFeedback/RecentFeedback.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { Stack } from "@omnidev/sigil";
3+
import { Flex, Stack } from "@omnidev/sigil";
44

55
import { Link, SkeletonArray } from "components/core";
66
import { FeedbackSection, Response } from "components/dashboard";
@@ -35,7 +35,7 @@ const RecentFeedback = () => {
3535
<FeedbackSection
3636
title="Recent Feedback"
3737
maxH="xl"
38-
contentProps={{ overflow: "auto", p: 6 }}
38+
contentProps={{ overflow: "auto", p: 2 }}
3939
>
4040
{isError ? (
4141
<ErrorBoundary
@@ -50,20 +50,20 @@ const RecentFeedback = () => {
5050
<SkeletonArray count={5} h={24} w="100%" />
5151
) : recentFeedback?.length ? (
5252
recentFeedback?.map((feedback) => (
53-
<Link
54-
key={feedback?.rowId}
55-
href={`/organizations/${feedback?.project?.organization?.slug}/projects/${feedback?.project?.slug}/${feedback?.rowId}`}
56-
>
57-
<Response
58-
feedback={feedback as Partial<Post>}
59-
p={2}
60-
_last={{ mb: 6 }}
61-
_hover={{
62-
bgColor: "background.muted",
63-
borderRadius: "md",
64-
}}
65-
/>
66-
</Link>
53+
<Flex key={feedback?.rowId} direction="column" _last={{ pb: 2 }}>
54+
<Link
55+
href={`/organizations/${feedback?.project?.organization?.slug}/projects/${feedback?.project?.slug}/${feedback?.rowId}`}
56+
>
57+
<Response
58+
feedback={feedback as Partial<Post>}
59+
p={2}
60+
_hover={{
61+
bgColor: "background.muted/40",
62+
borderRadius: "md",
63+
}}
64+
/>
65+
</Link>
66+
</Flex>
6767
))
6868
) : (
6969
<EmptyState

src/components/dashboard/Response/Response.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const Response = ({ feedback, ...rest }: Props) => {
4747
</Text>
4848
</Stack>
4949

50-
<HStack gap={3}>
50+
{/* TODO: discuss possible issues with responsive design (i.e. long project name and/or long username) */}
51+
<HStack gap={2}>
5152
{[
5253
{ icon: HiOutlineCalendar, text: date },
5354
{ icon: HiOutlineFolder, text: feedback.project?.name },

0 commit comments

Comments
 (0)