Skip to content

Commit

Permalink
Merge pull request #19 from saroh-io/dashboard
Browse files Browse the repository at this point in the history
[updated] id
  • Loading branch information
yashmehtaofficial committed Nov 29, 2023
2 parents dc7d2b0 + f754a9d commit 4cfe99b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ import prisma from "@/lib/prisma";
import { notFound, redirect } from "next/navigation";
import React from "react";

export default async function SitePage({
params,
}: {
params: { siteId: string };
}) {
export default async function SitePage({ params }: { params: { id: string } }) {
const session = await getSession();
if (!session) {
redirect("/login");
}
const data = await prisma.site.findUnique({
where: {
id: params.siteId,
id: params.id,
},
});

Expand Down Expand Up @@ -48,7 +44,7 @@ export default async function SitePage({
</div>
<CreatePostButton />
</div>
<Posts siteId={params.siteId} />
<Posts siteId={params.id} />
</>
);
}
2 changes: 1 addition & 1 deletion apps/application/components/create-post-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import LoadingDots from "@/components/icons/loading-dots";

export default function CreatePostButton() {
const router = useRouter();
const { id } = useParams() as { id: string };
const { id, } = useParams() as { id: string };
const [isPending, startTransition] = useTransition();

return (
Expand Down

5 comments on commit 4cfe99b

@vercel
Copy link

@vercel vercel bot commented on 4cfe99b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

app-saroh-io – ./apps/application

app.saroh.io
app-saroh-io.vercel.app
app-saroh-io-mishtusdotcom.vercel.app
app-saroh-io-git-main-mishtusdotcom.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 4cfe99b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

saroh-ui-site – ./apps/ui-site

saroh-ui-site.vercel.app
saroh-ui-site-git-main-mishtusdotcom.vercel.app
saroh-ui-site-mishtusdotcom.vercel.app
ui.saroh.io

@vercel
Copy link

@vercel vercel bot commented on 4cfe99b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 4cfe99b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

saroh-docs – ./apps/docs

saroh-docs-mishtusdotcom.vercel.app
saroh-docs.vercel.app
docs.saroh.io
saroh-docs-git-main-mishtusdotcom.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 4cfe99b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.