This commit is contained in:
1 parent
8deede7235
commit
68503e8915
3 files changed
+18
-5
No files matched your search
+1
-1
@@ -20,7 +20,7 @@ Debug:
|
||||
|
||||
\-Mobilansicht - Impressum/Datenschutz in das Profil rein legen, damit man es erreichen kann.
|
||||
|
||||
\-Mobilansicht - Nachrichten nicht aufrufbar weil kein Button vorhanden. kann gerne als Mail-Icon mitscrollend oben rechts in die ecke damit es immer erreichbar ist.
|
||||
~~\-Mobilansicht - Nachrichten nicht aufrufbar weil kein Button vorhanden. kann gerne als Mail-Icon mitscrollend oben rechts in die ecke damit es immer erreichbar ist.~~ ✅ ERLEDIGT
|
||||
|
||||
|
||||
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
import type { Metadata } from "next";
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import { ClerkProvider } from "@clerk/nextjs";
|
||||
import { NextIntlClientProvider } from "next-intl";
|
||||
@@ -18,6 +18,12 @@ export const metadata: Metadata = {
|
||||
description: "The social platform where pets are the stars.",
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
width: "device-width",
|
||||
initialScale: 1,
|
||||
viewportFit: "cover",
|
||||
};
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
|
||||
@@ -116,8 +116,11 @@ export function PostDetailDialog({ post, open, onClose, onDeleted }: PostDetailD
|
||||
trpc.comments.create.mutationOptions({
|
||||
onSuccess: () => {
|
||||
setPendingBody(null);
|
||||
void queryClient.invalidateQueries({ queryKey: [["trpc", "comments", "listByPost"]] });
|
||||
void queryClient.invalidateQueries({ queryKey: [["trpc", "feed", "getFeed"]] });
|
||||
if (post?.id) {
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: trpc.comments.listByPost.queryOptions({ postId: post.id, limit: 50 }).queryKey,
|
||||
});
|
||||
}
|
||||
setTimeout(() => commentsEndRef.current?.scrollIntoView({ behavior: "smooth" }), 150);
|
||||
},
|
||||
onError: () => {
|
||||
@@ -131,7 +134,11 @@ export function PostDetailDialog({ post, open, onClose, onDeleted }: PostDetailD
|
||||
const deleteCommentMutation = useMutation(
|
||||
trpc.comments.delete.mutationOptions({
|
||||
onSuccess: () => {
|
||||
void queryClient.invalidateQueries({ queryKey: [["trpc", "comments", "listByPost"]] });
|
||||
if (post?.id) {
|
||||
void queryClient.invalidateQueries({
|
||||
queryKey: trpc.comments.listByPost.queryOptions({ postId: post.id, limit: 50 }).queryKey,
|
||||
});
|
||||
}
|
||||
},
|
||||
onError: () => toast.error(tc("deleteError")),
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user