Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pin functionality issue in the comment dropdown menu #880

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
'use client';

import { Button } from '@/components/ui/button';
import { InfoIcon } from 'lucide-react';
import Link from 'next/link';
import { useEffect } from 'react';

export default function ErrorPage({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
// Log the error to an error reporting service
Expand Down
4 changes: 2 additions & 2 deletions src/components/Copy-to-clipbord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const CopyToClipboard = ({
};

return (
<div>
<button onClick={handleCopyClick}>
<div className="w-full">
<button className="w-full" onClick={handleCopyClick}>
<div className="flex items-center gap-x-2">
Copy <CopyIcon size={15} />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/comment/CommentApproveForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const CommentApproveForm = ({
});
};
return (
<form onSubmit={handleFormSubmit}>
<button type="submit" disabled={isLoading}>
<form className="w-full" onSubmit={handleFormSubmit}>
<button className="w-full" type="submit" disabled={isLoading}>
<div className="flex items-center gap-1">
Approve Chapters <CheckIcon className="h-4 w-4" />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/comment/CommentDeleteForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const CommentDeleteForm = ({ commentId }: { commentId: number }) => {
});
};
return (
<form onSubmit={handleFormSubmit}>
<button type="submit" disabled={isLoading}>
<form className="w-full" onSubmit={handleFormSubmit}>
<button className="w-full" type="submit" disabled={isLoading}>
<div className="flex items-center gap-x-2">
Delete <Trash2Icon className="h-4 w-4" />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/comment/CommentPinForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const CommentPinForm = ({
});
};
return (
<form onSubmit={handleFormSubmit}>
<button type="submit" disabled={isLoading}>
<form className="w-full" onSubmit={handleFormSubmit}>
<button className="w-full" type="submit" disabled={isLoading}>
<div className="flex items-center gap-1">
Pin <PinIcon className="h-4 w-4" />
</div>
Expand Down
10 changes: 5 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"incremental": true,
"plugins": [
{
"name": "next"
}
"name": "next",
},
],
"paths": {
"@/*": ["./src/*"],
"@public/*": ["./public/*"]
}
"@public/*": ["./public/*"],
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules"],
}
Loading