Skip to content

Commit

Permalink
fix(page.tsx): remove unused project_id parameter from Notice component
Browse files Browse the repository at this point in the history
chore(Backtrace.tsx): comment out BookmarkButton import and usage
style(ClipboardButton.tsx): update button styles to match design system and add hover effect
  • Loading branch information
masterkain committed May 26, 2023
1 parent f17e9ab commit a693802
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/notices/[notice_id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function Notice({
params,
searchParams,
}: {
params: { project_id: string; notice_id: string };
params: { notice_id: string };
searchParams: Record<string, string>;
}) {
const notice = await prisma.notice.findFirst({
Expand Down
6 changes: 3 additions & 3 deletions components/occurrence/Backtrace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import classNames from '@/lib/classNames';
import { BacktraceItem } from '@/types/airbroke';
import { Occurrence, Prisma, Project } from '@prisma/client';
import LinkedBacktraceLine from './BacktraceLine';
import BookmarkButton from './BookmarkButton';
// import BookmarkButton from './BookmarkButton';
import ClipboardButton from './ClipboardButton';

function isBacktraceItem(item: any): item is BacktraceItem {
Expand All @@ -13,9 +13,9 @@ export default function Backtrace({ occurrence, project }: { occurrence: Occurre
return (
<div className="px-4 sm:px-6 lg:px-8">
<div className="flex items-center justify-between">
<div className="flex items-center gap-x-4">
<div className="mb-4 flex items-center gap-x-4">
<ClipboardButton json={occurrence.backtrace} />
<BookmarkButton projectId={project.id} noticeId={occurrence.notice_id} occurrenceId={occurrence.id} />
{/* <BookmarkButton projectId={project.id} noticeId={occurrence.notice_id} occurrenceId={occurrence.id} /> */}
</div>
</div>
{occurrence.backtrace && typeof occurrence.backtrace === 'object' && Array.isArray(occurrence.backtrace) && (
Expand Down
2 changes: 1 addition & 1 deletion components/occurrence/ClipboardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ClipboardButton({ json }: { json: Prisma.JsonValue }) {
return (
<button
onClick={handleCopy}
className="inline-flex items-center gap-x-1.5 rounded-md bg-indigo-900 px-3 py-2 text-sm font-semibold text-indigo-200 hover:bg-indigo-800 hover:text-white"
className="inline-flex items-center gap-x-1.5 rounded-md px-3 py-2 text-sm font-semibold text-indigo-200 shadow-sm transition-colors duration-200 hover:bg-indigo-500 hover:text-white"
>
<HiClipboardCopy className="h-4 w-4 md:h-5 md:w-5" aria-hidden="true" />
{isCopied ? 'Copied!' : 'Copy to Clipboard'}
Expand Down

0 comments on commit a693802

Please sign in to comment.