Skip to content

Commit efdf816

Browse files
committed
fix feedback context
1 parent 76bba21 commit efdf816

File tree

3 files changed

+33
-17
lines changed

3 files changed

+33
-17
lines changed

src/components/FeedbackModerationList.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,22 @@ export function FeedbackModerationList({
271271
className="bg-gray-50 dark:bg-gray-900"
272272
>
273273
<div className="p-4 space-y-4">
274-
{/* Content */}
274+
{/* Original Block Content */}
275+
{feedback.blockMarkdown && (
276+
<div>
277+
<h4 className="text-sm font-semibold mb-2">
278+
Original Block Content:
279+
</h4>
280+
<div className="text-sm text-gray-600 dark:text-gray-400 whitespace-pre-wrap bg-white dark:bg-gray-800 p-3 rounded border border-gray-200 dark:border-gray-700 font-mono text-xs max-h-40 overflow-auto">
281+
{feedback.blockMarkdown}
282+
</div>
283+
</div>
284+
)}
285+
286+
{/* Feedback */}
275287
<div>
276288
<h4 className="text-sm font-semibold mb-2">
277-
Content:
289+
Feedback:
278290
</h4>
279291
<div className="text-sm text-gray-600 dark:text-gray-400 whitespace-pre-wrap bg-white dark:bg-gray-800 p-3 rounded border border-gray-200 dark:border-gray-700">
280292
{feedback.content}

src/components/ShowcaseDetail.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ThumbsDown,
99
Sparkles,
1010
} from 'lucide-react'
11+
import { Button } from './Button'
1112
import { twMerge } from 'tailwind-merge'
1213
import { libraries, type LibraryId } from '~/libraries'
1314
import { USE_CASE_LABELS } from '~/utils/showcase.client'
@@ -257,15 +258,16 @@ export function ShowcaseDetail({ showcaseId }: ShowcaseDetailProps) {
257258
</p>
258259
</div>
259260
</div>
260-
<a
261+
<Button
262+
as="a"
261263
href={showcase.url}
262264
target="_blank"
263265
rel="noopener noreferrer"
264-
className="inline-flex items-center gap-2 px-5 py-2.5 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors shrink-0"
266+
className="px-4 py-2 text-sm bg-gray-900 dark:bg-white text-white dark:text-gray-900 border-gray-900 dark:border-white hover:bg-gray-700 dark:hover:bg-gray-200 shrink-0"
265267
>
266268
Visit Site
267269
<ExternalLink className="w-4 h-4" />
268-
</a>
270+
</Button>
269271
</div>
270272

271273
{/* Description */}

src/routes/admin/feedback_.$id.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,22 @@ function FeedbackDetailPage() {
154154
</div>
155155

156156
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
157-
{/* Content */}
157+
{/* Original Block Content */}
158+
{feedback.blockMarkdown && (
159+
<Card className="p-6 lg:col-span-2">
160+
<h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
161+
Original Block Content
162+
</h2>
163+
<div className="text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-800 p-3 rounded font-mono whitespace-pre-wrap max-h-60 overflow-auto">
164+
{feedback.blockMarkdown}
165+
</div>
166+
</Card>
167+
)}
168+
169+
{/* Feedback */}
158170
<Card className="p-6 lg:col-span-2">
159171
<h2 className="text-lg font-semibold text-gray-900 dark:text-white mb-4">
160-
Feedback Content
172+
Feedback
161173
</h2>
162174
<div className="prose dark:prose-invert max-w-none">
163175
<p className="whitespace-pre-wrap text-gray-900 dark:text-white">
@@ -194,16 +206,6 @@ function FeedbackDetailPage() {
194206
</dd>
195207
</div>
196208
)}
197-
{feedback.blockMarkdown && (
198-
<div>
199-
<dt className="text-sm font-medium text-gray-500 dark:text-gray-400">
200-
Original Block Content
201-
</dt>
202-
<dd className="mt-1 text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-800 p-2 rounded font-mono text-xs whitespace-pre-wrap max-h-40 overflow-auto">
203-
{feedback.blockMarkdown}
204-
</dd>
205-
</div>
206-
)}
207209
<div>
208210
<dt className="text-sm font-medium text-gray-500 dark:text-gray-400 flex items-center gap-2">
209211
<Calendar className="w-4 h-4" />

0 commit comments

Comments
 (0)