static id

This commit is contained in:
hamid zarghami
2025-04-16 12:26:28 +03:30
parent d87925998f
commit 5e5f02ee06
4 changed files with 4007 additions and 17 deletions
+5 -4
View File
@@ -4,20 +4,21 @@ RUN apk add --no-cache tzdata && \
cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && \
echo "Asia/Tehran" > /etc/timezone
# RUN corepack enable && corepack prepare pnpm@latest --activate
RUN npm install -g corepack
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
FROM base AS deps
RUN apk add --no-cache libc6-compat git
COPY package*.json ./
RUN npm ci --ignore-scripts --loglevel info
COPY pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --ignore-scripts
FROM base AS builder
WORKDIR /build
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build && npm ci --omit=dev --ignore-scripts --loglevel info
RUN pnpm build && pnpm install --prod --frozen-lockfile --ignore-scripts
FROM base AS runner
WORKDIR /app
+2 -3
View File
@@ -35,9 +35,8 @@
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.2.3",
"i": "^0.3.7",
"npm": "^11.3.0",
"tailwindcss": "^4",
"typescript": "^5"
}
},
"packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531"
}
+3990
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -5,20 +5,20 @@ import { NextPage } from 'next'
import SingleBlogPage from '../components/SingleBlogPage'
import Loading from './loading'
interface PageProps {
params: Promise<{
id: string
}>
}
// interface PageProps {
// params: Promise<{
// id: string
// }>
// }
const SingleBlog: NextPage<PageProps> = async ({ params }) => {
const SingleBlog: NextPage = async () => {
const { id } = await params
console.log("loading", id);
// const { id } = await params
// console.log("loading", id);
return (
<Suspense fallback={<Loading />}>
<BlogContent id={id} />
<BlogContent id={'7539fa00-e8e0-4b2b-a4b5-655284b5e8a1'} />
</Suspense>
)
}
@@ -28,7 +28,7 @@ async function BlogContent({ id }: { id: string }) {
const queryClient = new QueryClient()
await Promise.all([
queryClient.prefetchQuery(blogSingleQueryOptions(id)),
queryClient.prefetchQuery(blogSingleQueryOptions('7539fa00-e8e0-4b2b-a4b5-655284b5e8a1')),
// queryClient.prefetchQuery(mostVisitedBlogsQueryOptions)
])