Bugfix
This commit is contained in:
parent
a6a3b8056d
commit
a3732103bf
@ -1,5 +1,5 @@
|
||||
# Set Node.js version
|
||||
FROM node:bookworm
|
||||
FROM node:alpine
|
||||
|
||||
RUN mkdir /app
|
||||
|
||||
@ -8,8 +8,8 @@ WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json
|
||||
|
||||
RUN apt update
|
||||
RUN apt install nano -y
|
||||
RUN apk update
|
||||
RUN apk add nano
|
||||
|
||||
RUN touch /root/.bashrc
|
||||
RUN echo 'alias ll="ls -laF"' > /root/.bashrc
|
||||
|
@ -56,6 +56,7 @@ export default async function BlogIndex({
|
||||
}: {
|
||||
params: any;
|
||||
}) {
|
||||
try {
|
||||
//* Data fetching
|
||||
const post = await getPost({ single: single });
|
||||
|
||||
@ -72,4 +73,7 @@ export default async function BlogIndex({
|
||||
);
|
||||
|
||||
/** ********************************************** */
|
||||
} catch (error) {
|
||||
return redirect("/blog");
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,7 @@
|
||||
import React from "react";
|
||||
import { Metadata } from "next";
|
||||
const datasquirel = require("datasquirel");
|
||||
|
||||
import { headers, cookies } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//* Metadata
|
||||
@ -26,6 +25,7 @@ export const revalidate = 3600;
|
||||
* ==============================================================================
|
||||
*/
|
||||
export default async function BlogIndex() {
|
||||
try {
|
||||
//* Data fetching
|
||||
/////////////////////////////////////////////
|
||||
const postsResponse = await datasquirel.get({
|
||||
@ -74,4 +74,7 @@ export default async function BlogIndex() {
|
||||
);
|
||||
|
||||
/** ********************************************** */
|
||||
} catch (error) {
|
||||
return redirect("/");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user