-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from Monobladegg/main
Fix search account and bug white theme
- Loading branch information
Showing
17 changed files
with
466 additions
and
1,289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
"use client"; | ||
import React, { useState, useEffect } from "react"; | ||
import React, { useEffect } from "react"; | ||
import SearchBar from "@/components/Search"; | ||
import MainLayout from "@/components/layouts"; | ||
import { usePublic } from "@/context/net"; | ||
import { useRouter } from "next/navigation"; | ||
import useTheme from "@/hook/theme"; | ||
export default function Home() { | ||
const { theme, setTheme } = useTheme(); | ||
const [net, setNet] = usePublic(); | ||
const route = useRouter(); | ||
useEffect(() => { | ||
const currentPath = window.location.pathname; | ||
if(currentPath.includes('/public/')) { | ||
setNet('public') | ||
} else if (currentPath.includes('/testnet/')) { | ||
setNet('testnet') | ||
if (currentPath.includes("/public/")) { | ||
setNet("public"); | ||
} else if (currentPath.includes("/testnet/")) { | ||
setNet("testnet"); | ||
} else { | ||
setNet('public') | ||
route.replace('/public') | ||
setNet("public"); | ||
route.replace("/public"); | ||
} | ||
}) | ||
}); | ||
return ( | ||
<MainLayout> | ||
<SearchBar setParNet={setNet} /> | ||
<SearchBar /> | ||
</MainLayout> | ||
); | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use client"; | ||
import PublicNet from "./publicnet"; // Adjust the import path as needed | ||
import StellarSdk from "stellar-sdk"; | ||
import MainLayout from "@/components/layouts"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export default function Page() { | ||
const [href, setHref] = useState(""); | ||
useEffect(() => setHref(window.location.href), []); | ||
const id = href.split("id=").pop(); | ||
|
||
if (!StellarSdk.StrKey.isValidEd25519PublicKey(id)) { | ||
return ( | ||
<> | ||
<MainLayout> | ||
<div className="cotainer"> | ||
<div | ||
className={`search error container narrow`} | ||
style={{ padding: "20px" }} | ||
> | ||
<h2 className="text-overflow"> | ||
Search results for {id} | ||
</h2> | ||
<div>User ID not found or invalid.</div> | ||
</div> | ||
</div> | ||
</MainLayout> | ||
</> | ||
); | ||
} | ||
return <PublicNet id={id} />; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
"use client"; | ||
import React, { useState, useEffect } from "react"; | ||
import SearchBar from "@/components/Search"; | ||
import MainLayout from "@/components/layouts"; | ||
import { usePublic } from "@/context/net"; | ||
import { useRouter } from "next/navigation"; | ||
export default function Home() { | ||
const [net, setNet] = usePublic(); | ||
const route = useRouter(); | ||
|
||
export default function Home() { | ||
return ( | ||
<MainLayout> | ||
<SearchBar setParNet={setNet} /> | ||
</MainLayout> | ||
<div className="page-container"> | ||
<SearchBar /> | ||
</div> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.