Skip to content

Commit

Permalink
refactor bunker.ts
Browse files Browse the repository at this point in the history
(will be depreciated for sdk)
  • Loading branch information
Cattn committed Sep 16, 2024
1 parent fbc201d commit 54080dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/internal/Updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { toast } from "sonner";
import { RefreshCw } from "lucide-react";
import { Button } from "@/components/ui/button";
import * as semver from "semver";
import version from "@/lib/bunker";
import bunker from "@/lib/bunker";

import {
DropdownMenu,
Expand All @@ -23,7 +23,7 @@ const Updater: Plugin = {
const [installedVersion, setInstalledVersion] = useState<string>();

useEffect(() => {
setInstalledVersion(version);
setInstalledVersion(bunker.version);
async function getLatestVersion() {
const response = await fetch(
"https://api.github.com/repos/bunkerweb/bunker/tags"
Expand Down Expand Up @@ -109,7 +109,7 @@ const Updater: Plugin = {
return (
<>
<p>Latest Bunker version: {latestVersion}</p>
<p>Installed Bunker version: {version}</p>
<p>Installed Bunker version: {bunker.version}</p>
</>
);
},
Expand All @@ -126,7 +126,7 @@ const Updater: Plugin = {
},[selectedVersion])

useEffect(() => {
setInstalledVersion(version);
setInstalledVersion(bunker.version);
});

useState(() => {
Expand Down
8 changes: 7 additions & 1 deletion src/lib/bunker.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
const version = "v0.2.3";
export default version;
const pluginLocation = "internal"

const bunker = {
version,
pluginLocation
}
export default bunker;

0 comments on commit 54080dc

Please sign in to comment.