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

Bug: Fixed responsiveness fixed in code preview tabs successfully issue 520 #521

Merged
merged 3 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion frontend/src/components/PostCodeWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function PostCodeWindow({
: "border border-sky-500 text-sky-500 dark:text-white"
}`}
>
JavaScript
JS
</button>
)}
</div>
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/components/PostCodeWithPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PostCodeWindow from "./PostCodeWindow";
import PostPreview from "./PostPreview";
import { Link } from "react-router-dom";
import toast from "react-hot-toast";
import { FaRegCopy,FaRegEdit,FaRobot } from "react-icons/fa";

type Props = {
id: string;
Expand Down Expand Up @@ -75,23 +76,23 @@ const PostCodeWithPreview = ({
{isOwner ? (
<Link
to={`/app/posts/edit/${id}`}
className="px-2 py-1 bg-blue-600 hover:bg-blue-700 text-white text-sm rounded"
className="px-2 py-1 bg-blue-600 hover:bg-blue-700 rounded text-white"
>
Edit
<FaRegEdit/>
</Link>
) : null}
<button
onClick={handleCopy}
className="px-2 py-1 bg-blue-600 hover:bg-blue-700 text-white text-sm rounded"
className="px-2 py-1 bg-blue-600 hover:bg-blue-700 rounded text-white"
>
Copy
<FaRegCopy/>
</button>
{showCustomizeAiOption && (
<button
onClick={handleCustomizeAi}
className="px-2 py-1 rounded-md text-white bg-green-600 hover:bg-green-700 text-sm"
className="px-2 py-1 rounded-md bg-green-600 hover:bg-green-700 text-white"
>
Customize AI
<FaRobot/>
</button>
)}
{!showTogether && (
Expand Down
Loading