- Network
{net}
-
+
+
+ Network{" "}
+
+ {theme !== "day" ? (
+
+ {net}
+
+ ) : (
+
+ {net}
+
+ )}
+
{isOpen && (
-
-
handleSelect('public')}>public
-
handleSelect('testnet')}>testnet
+
+
handleSelect("public")}
+ >
+ public
+
+
handleSelect("testnet")}
+ >
+ testnet
+
)}
diff --git a/src/hook/theme.js b/src/hook/theme.js
index 091e445..315da27 100644
--- a/src/hook/theme.js
+++ b/src/hook/theme.js
@@ -3,24 +3,26 @@
import { useEffect, useState } from "react";
const useTheme = () => {
- const [theme, setTheme] = useState('night');
+ const [theme, setTheme] = useState("night");
+
useEffect(() => {
- const _theme = localStorage.getItem("theme");
- if(_theme) {
- setTheme(_theme);
+ const savedTheme = typeof window !== "undefined" ? localStorage.getItem("theme") : null;
+ if (savedTheme) {
+ setTheme(savedTheme);
} else {
- localStorage.setItem('theme', 'night');
- setTheme('night');
+ localStorage.setItem("theme", "night");
}
}, []);
- const changeTheme = (value) => {
- setTheme(value);
- };
+ useEffect(() => {
+ if (typeof window !== "undefined") {
+ localStorage.setItem("theme", theme);
+ }
+ }, [theme]);
return {
- theme: theme,
- setTheme: changeTheme,
+ theme,
+ setTheme,
};
};
From ba975bce2f43d605765c8d00d5bffb8c00443ab1 Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:12:54 +0300
Subject: [PATCH 3/9] Edits
---
.github/workflows/nextjs.yml | 4 +++-
app/globals.css | 8 +++-----
app/public/account/page.js | 8 +-------
package.json | 2 +-
4 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml
index 1e7a671..e814edd 100644
--- a/.github/workflows/nextjs.yml
+++ b/.github/workflows/nextjs.yml
@@ -8,6 +8,8 @@ on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
+ pull_request:
+ branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@@ -72,7 +74,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
- run: npm i
+ run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
diff --git a/app/globals.css b/app/globals.css
index 5dd7756..3d09337 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -4,16 +4,14 @@
.search {
width: 100%;
- border: 1px solid #08b5e5 !important;
- padding: 10px;
+ outline: 1px solid #08b5e5; padding: 10px;
border-radius: 20px;
background: transparent;
text-align: center;
color: white;
- box-shadow: 1px 4px #08b5e580 !important;
}
-.search-light {
+/* .search-light {
width: 100%;
border: 1px solid #66666681 !important;
padding: 10px;
@@ -22,7 +20,7 @@
text-align: center;
color: white;
box-shadow: 1px 4px #66666681 !important;
-}
+} */
.search:focus-visible {
outline: none;
diff --git a/app/public/account/page.js b/app/public/account/page.js
index 9361ad3..1817d13 100644
--- a/app/public/account/page.js
+++ b/app/public/account/page.js
@@ -5,15 +5,9 @@ import MainLayout from "@/components/layouts";
import { useEffect, useState } from "react";
export default function Page() {
-
const [href, setHref] = useState("");
- useEffect(() => {
- setHref(window.location.href);
- }, []);
- console.log(href);
-
+ useEffect(() => setHref(window.location.href), []);
const id = href.split("id=").pop();
- console.log(id)
if (!StellarSdk.StrKey.isValidEd25519PublicKey(id)) {
return (
diff --git a/package.json b/package.json
index 667e246..421b888 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "mtl-stellar-multisig",
"version": "0.1.0",
"private": true,
- "homepage": "https://monobladegg.github.io/stellar-multisig-stanging",
+ "homepage": "https://stellar-multisig.montelibero.org",
"scripts": {
"dev": "next dev",
"build": "next build",
From f5d988368e5f6a30b2752a93c4ca754abf548be1 Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:28:06 +0300
Subject: [PATCH 4/9] fix deploy
---
package-lock.json | 15 ++++++++++++++-
package.json | 3 ++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 37ed9dd..487a6fe 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,8 @@
"stellar-sdk": "^10.4.1",
"swr": "^2.2.5",
"tailwind-merge": "^2.3.0",
- "tailwindcss-animate": "^1.0.7"
+ "tailwindcss-animate": "^1.0.7",
+ "typescript": "^5.5.4"
},
"devDependencies": {
"eslint": "^8",
@@ -5371,6 +5372,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/typescript": {
+ "version": "5.5.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
+ "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/unbox-primitive": {
"version": "1.0.2",
"dev": true,
diff --git a/package.json b/package.json
index 421b888..ac4f6bb 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,8 @@
"stellar-sdk": "^10.4.1",
"swr": "^2.2.5",
"tailwind-merge": "^2.3.0",
- "tailwindcss-animate": "^1.0.7"
+ "tailwindcss-animate": "^1.0.7",
+ "typescript": "^5.5.4"
},
"devDependencies": {
"eslint": "^8",
From 8d22a1582fd2cc11c8e3a3ce94f1c2d7fc014b58 Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:32:58 +0300
Subject: [PATCH 5/9] fix deploy 2
---
.github/workflows/nextjs.yml | 35 ++++++++++++-----------------------
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml
index e814edd..5a492e0 100644
--- a/.github/workflows/nextjs.yml
+++ b/.github/workflows/nextjs.yml
@@ -1,38 +1,28 @@
-# Sample workflow for building and deploying a Next.js site to GitHub Pages
-#
-# To get started with Next.js see: https://nextjs.org/docs/getting-started
-#
name: Deploy Next.js site to Pages
on:
- # Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
-
- # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
-# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
-# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
-# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
- # Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
+
- name: Detect package manager
id: detect-package-manager
run: |
@@ -40,49 +30,48 @@ jobs:
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
- exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
- exit 0
else
echo "Unable to determine package manager"
exit 1
fi
+
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
+
- name: Setup Pages
uses: actions/configure-pages@v5
with:
- # Automatically inject basePath in your Next.js configuration file and disable
- # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
- #
- # You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
+
- name: Restore cache
uses: actions/cache@v4
with:
- path: |
- .next/cache
- # Generate a new cache whenever packages or source files change.
+ path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
- # If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
+
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
+
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
+
+ - name: Export with Next.js
+ run: ${{ steps.detect-package-manager.outputs.runner }} next export
+
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
- path: ./out
+ path: out
- # Deployment job
deploy:
environment:
name: github-pages
From cefe3c4ff0f95e4cf34da5ff2aeda7b3ae807884 Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:40:09 +0300
Subject: [PATCH 6/9] fix deploy 3
---
.github/workflows/nextjs.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml
index 5a492e0..8954859 100644
--- a/.github/workflows/nextjs.yml
+++ b/.github/workflows/nextjs.yml
@@ -7,10 +7,8 @@ on:
branches: ["main"]
workflow_dispatch:
-permissions:
- contents: read
- pages: write
- id-token: write
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions: write-all
concurrency:
group: "pages"
From 23aa3582f0b874fe617cf44624cd3c3928c0b999 Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:42:08 +0300
Subject: [PATCH 7/9] fix deploy 4
---
.github/workflows/nextjs.yml | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml
index 8954859..3c0802e 100644
--- a/.github/workflows/nextjs.yml
+++ b/.github/workflows/nextjs.yml
@@ -1,26 +1,35 @@
+# Sample workflow for building and deploying a Next.js site to GitHub Pages
+#
+# To get started with Next.js see: https://nextjs.org/docs/getting-started
+#
name: Deploy Next.js site to Pages
on:
+ # Runs on pushes targeting the default branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
+
+ # Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions: write-all
+# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
+# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
+ # Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
-
- name: Detect package manager
id: detect-package-manager
run: |
@@ -28,48 +37,49 @@ jobs:
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
+ exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
+ exit 0
else
echo "Unable to determine package manager"
exit 1
fi
-
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
-
- name: Setup Pages
uses: actions/configure-pages@v5
with:
+ # Automatically inject basePath in your Next.js configuration file and disable
+ # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
+ #
+ # You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
-
- name: Restore cache
uses: actions/cache@v4
with:
- path: .next/cache
+ path: |
+ .next/cache
+ # Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
+ # If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
-
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
-
- - name: Export with Next.js
- run: ${{ steps.detect-package-manager.outputs.runner }} next export
-
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
- path: out
+ path: ./out
+ # Deployment job
deploy:
environment:
name: github-pages
From 686653c151f1ce070cf8067b2dea535304fdbd06 Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:43:58 +0300
Subject: [PATCH 8/9] fix deploy 5
---
.github/workflows/nextjs.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml
index 3c0802e..1b402ec 100644
--- a/.github/workflows/nextjs.yml
+++ b/.github/workflows/nextjs.yml
@@ -15,7 +15,6 @@ on:
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
-permissions: write-all
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -27,6 +26,10 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ pages: write
+ id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
From 59e75b8ccb60d9579d0371ea0b9202b0c618ad3b Mon Sep 17 00:00:00 2001
From: Monoblade <157546326+Monobladegg@users.noreply.github.com>
Date: Sat, 3 Aug 2024 10:47:59 +0300
Subject: [PATCH 9/9] fix deploy 6
---
.github/workflows/nextjs.yml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml
index 1b402ec..8a989e6 100644
--- a/.github/workflows/nextjs.yml
+++ b/.github/workflows/nextjs.yml
@@ -15,6 +15,10 @@ on:
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions:
+ contents: read
+ pages: write
+ id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -26,10 +30,6 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
- permissions:
- contents: read
- pages: write
- id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -91,5 +91,6 @@ jobs:
needs: build
steps:
- name: Deploy to GitHub Pages
+ if: github.ref == 'refs/heads/main'
id: deployment
- uses: actions/deploy-pages@v4
+ uses: actions/deploy-pages@v4
\ No newline at end of file