-
Notifications
You must be signed in to change notification settings - Fork 75
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 #222 from helius-labs/devnet
Devnet
- Loading branch information
Showing
58 changed files
with
668 additions
and
439 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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,7 +1,16 @@ | ||
{#each [{ name: "Home", url: "/" }, { name: "About Helius APIs", url: "https://helius.xyz" }, { name: "Contribute", url: "https://github.com/helius-labs/xray" }, { name: "Join Discord", url: "https://discord.gg/mV3dNPwDnZ" }] as { name, url }} | ||
<script> | ||
import Network from "../network.svelte"; | ||
const params = new URLSearchParams(window.location.search); | ||
const network = params.get("network"); | ||
const isMainnetValue = network !== "devnet"; | ||
</script> | ||
|
||
{#each [{ name: "Home", url: `/?network=${isMainnetValue ? "mainnet" : "devnet"}` }, { name: "About Helius APIs", url: "https://helius.xyz" }, { name: "Contribute", url: "https://github.com/helius-labs/xray" }, { name: "Join Discord", url: "https://discord.gg/nSkq35VUf5" }] as { name, url }} | ||
<a | ||
href={url} | ||
data-sveltekit-reload | ||
class="btn btn-ghost w-full">{name}</a | ||
class="btn-ghost btn w-full">{name}</a | ||
> | ||
{/each} | ||
<Network /> |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script lang="ts"> | ||
import { onMount } from "svelte"; | ||
let isMainnetValue = true; | ||
onMount(() => { | ||
const savedIsMainnet = localStorage.getItem("isMainnet"); | ||
if (savedIsMainnet !== null) { | ||
isMainnetValue = JSON.parse(savedIsMainnet); | ||
} | ||
}); | ||
onMount(() => { | ||
const params = new URLSearchParams(window.location.search); | ||
const network = params.get("network"); | ||
isMainnetValue = network !== "devnet"; | ||
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue)); | ||
}); | ||
function toggleNetwork(event: Event) { | ||
isMainnetValue = (event.target as HTMLInputElement).checked; | ||
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue)); | ||
const params = new URLSearchParams(window.location.search); | ||
params.set("network", isMainnetValue ? "mainnet" : "devnet"); | ||
history.replaceState({}, "", "?" + params.toString()); | ||
history.go(0); | ||
} | ||
</script> | ||
|
||
<div class="toggle-container m-auto mt-2 flex w-full flex-col justify-center"> | ||
<label class="toggle-label m-auto flex flex-col"> | ||
<input | ||
type="checkbox" | ||
class="toggle flex justify-center" | ||
bind:checked={isMainnetValue} | ||
on:change={toggleNetwork} | ||
/> | ||
<span class="toggle-mark" /> | ||
</label> | ||
<span class="network-text m-auto my-1 flex flex-col font-bold" | ||
>{isMainnetValue ? "Mainnet" : "Devnet"}</span | ||
> | ||
</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
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
Oops, something went wrong.
486de01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
xray-web – ./
xray.helius.xyz
xray-web-git-vercel-prod-helius.vercel.app
helius-xray.vercel.app
xray-web-helius.vercel.app