From 2979302e64a5fa04576781743b78c509c69851f7 Mon Sep 17 00:00:00 2001 From: Arif Hasanic Date: Sat, 27 Jun 2026 22:28:21 +0200 Subject: [PATCH] remove ass --- .gitea/workflows/ci.yml | 2 -- pipeline/create-git-hash-html.sh | 3 --- src/components/Dashboard/Dashboard.tsx | 22 ---------------------- 3 files changed, 27 deletions(-) delete mode 100755 pipeline/create-git-hash-html.sh diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 6aaf438..331c532 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -36,8 +36,6 @@ jobs: VITE_HA_TOKEN: ${{ secrets.VITE_HA_TOKEN }} - name: Build run: bun run build - - name: Write Git-Hash into html - run: ./pipeline/create-git-hash-html.sh - name: Create Build Artifact uses: christopherhx/gitea-upload-artifact@v4 with: diff --git a/pipeline/create-git-hash-html.sh b/pipeline/create-git-hash-html.sh deleted file mode 100755 index 0a04a8e..0000000 --- a/pipeline/create-git-hash-html.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "$GITHUB_SHA" > dist/git-hash.html \ No newline at end of file diff --git a/src/components/Dashboard/Dashboard.tsx b/src/components/Dashboard/Dashboard.tsx index f63857f..a2694b4 100644 --- a/src/components/Dashboard/Dashboard.tsx +++ b/src/components/Dashboard/Dashboard.tsx @@ -16,28 +16,6 @@ import Weather from "@/components/Weather/Weather"; import style from "./style.module.css"; export default function Dashboard() { - // '/git-hash.html' contains the current git commit hash, check it every 10 seconds and reload if it isn't the same - const [gitHash, setGitHash] = useState(""); - - useEffect(() => { - const interval = setInterval(async () => { - const response = await fetch("/git-hash.html"); - const text = await response.text(); - const newHash = text.trim(); - console.log("Fetched git hash:", newHash); - - if (gitHash === "") { - setGitHash(newHash); - } - - if (gitHash !== "" && newHash !== gitHash) { - setGitHash(newHash); - window.location.reload(); - } - }, 10000); - return () => clearInterval(interval); - }, [gitHash]); - const schemes = [style.day, style.evening, style.night]; const [schemeIndex, setSchemeIndex] = useState(0); const scheme = schemes[schemeIndex];