Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-josheghani committed Sep 10, 2024
2 parents 0917a3e + e8498ff commit 775bf67
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ jobs:
git pull
npm install --force
npm run build
if [ -f "package.json" ]; then
if pm2 describe "salamlang-website" > /dev/null; then
pm2 restart "salamlang-website"
if [ $? -eq 0 ]; then
if [ -f "package.json" ]; then
if pm2 describe "salamlang-website" > /dev/null; then
pm2 restart "salamlang-website"
else
pm2 start --name "salamlang-website" "npm run start -- -p 3001"
fi
pm2 save
else
pm2 start --name "salamlang-website" "npm run start -- -p 3001"
echo "package.json not found. Skipping start/restart."
fi
pm2 save
else
echo "package.json not found. Skipping start/restart."
echo "Build failed. Skipping PM2 restart."
fi
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import DownloadItem from "@/components/molecules/DownloadItem";
import LoadingPage from "@/components/molecules/LoadingPage";
import { Suspense } from "react";

export const metadata = {
title: "دانلود زبان سلام - برنامه نویسی سلام",
Expand All @@ -9,9 +11,11 @@ export const metadata = {

function page() {
return (
<div className="flex flex-col items-center justify-center overflow-hidden gap-5 my-auto pb-20">
<DownloadItem />
</div>
<Suspense fallback={<LoadingPage />}>
<div className="flex flex-col items-center justify-center overflow-hidden gap-5 my-auto pb-20">
<DownloadItem />
</div>
</Suspense>
);
}

Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions src/components/molecules/LoadingPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import { LoaderIcon } from "react-hot-toast";

export default function LoadingPage() {
return (
<div className="fixed w-full h-full bg-white/50 backdrop-blur-xl inset-0 z-[101] flex justify-center items-center overflow-hidden">
<LoaderIcon />
</div>
);
}

0 comments on commit 775bf67

Please sign in to comment.