Skip to content

Commit

Permalink
style: fix prettier formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dineshsutihar committed Oct 23, 2024
1 parent 2fc7387 commit 0a49461
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 8 additions & 2 deletions app/(app)/alpha/new/[[...postIdArr]]/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ const Create = () => {

<div className="flex items-center justify-between">
<div>
{saveStatus === "loading" && (<p className="text-xs lg:text-sm">Auto-saving...</p>)}
{saveStatus === "loading" && (
<p className="text-xs lg:text-sm">Auto-saving...</p>
)}
{saveStatus === "error" && savedTime && (
<p className="text-xs text-red-600 lg:text-sm">
Error saving, last saved: {savedTime.toString()}
Expand All @@ -254,7 +256,11 @@ const Create = () => {
disabled={isDisabled}
className="ml-5 inline-flex justify-center bg-gradient-to-r from-orange-400 to-pink-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:from-orange-300 hover:to-pink-500 focus:outline-none focus:ring-2 focus:ring-pink-300 focus:ring-offset-2 disabled:opacity-50"
onClick={() => setOpen(true)}
aria-label={data?.published ? "Save changes to document" : "Publish document"}
aria-label={
data?.published
? "Save changes to document"
: "Publish document"
}
>
{data?.published ? "Save Changes" : "Publish"}
</button>
Expand Down
7 changes: 3 additions & 4 deletions app/(app)/articles/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { getPost } from "@/server/lib/posts";
import { getCamelCaseFromLower } from "@/utils/utils";
import { generateHTML } from "@tiptap/html";
import { TiptapExtensions } from "@/components/editor/editor/extensions";
import DOMPurify from 'isomorphic-dompurify';
import type { JSONContent } from '@tiptap/core';
import DOMPurify from "isomorphic-dompurify";
import type { JSONContent } from "@tiptap/core";

type Props = { params: { slug: string } };

Expand Down Expand Up @@ -104,7 +104,6 @@ const ArticlePage = async ({ params }: Props) => {
}) as unknown as string;
}


return (
<>
<ArticleMenu
Expand All @@ -116,7 +115,7 @@ const ArticlePage = async ({ params }: Props) => {
/>
<div className="mx-auto break-words px-2 pb-4 sm:px-4 md:max-w-3xl">
<article className="prose mx-auto max-w-3xl dark:prose-invert lg:prose-lg">
{!isTiptapContent && (<h1>{post.title}</h1>)}
{!isTiptapContent && <h1>{post.title}</h1>}

{isTiptapContent ? (
<div
Expand Down

0 comments on commit 0a49461

Please sign in to comment.