-
Notifications
You must be signed in to change notification settings - Fork 76
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 #235 from helius-labs/vercel/prod
Sync Prod and Dev Branches
- Loading branch information
Showing
61 changed files
with
1,058 additions
and
467 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script lang="ts"> | ||
import { onMount } from "svelte"; | ||
export let src: string; | ||
export let className = ""; | ||
export let alt = "image"; | ||
let loaded = false; | ||
let failed = false; | ||
let loading = false; | ||
onMount(() => { | ||
const img = new Image(); | ||
img.src = src; | ||
loading = true; | ||
img.onload = () => { | ||
loading = false; | ||
loaded = true; | ||
}; | ||
img.onerror = () => { | ||
loading = false; | ||
failed = true; | ||
}; | ||
}); | ||
</script> | ||
|
||
{#if loading} | ||
<img | ||
src="https://samherbert.net/svg-loaders/svg-loaders/bars.svg" | ||
class="{className} scale-[0.25] opacity-50" | ||
{alt} | ||
/> | ||
{:else if failed} | ||
<img | ||
src="https://imgs.search.brave.com/_21o9NXVQGftTNHMC4ZBLatg4jZkXGTJj3bRU6Q11CY/rs:fit:860:0:0/g:ce/aHR0cHM6Ly9jZG40/Lmljb25maW5kZXIu/Y29tL2RhdGEvaWNv/bnMvb2ZmaWNlLXRo/aWNrLW91dGxpbmUv/MzYvb2ZmaWNlLTA4/LTEyOC5wbmc" | ||
class="{className} scale-50 opacity-50" | ||
{alt} | ||
/> | ||
{:else if loaded} | ||
<img | ||
{src} | ||
class={className} | ||
{alt} | ||
/> | ||
{/if} |
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,12 @@ | ||
{#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"; | ||
</script> | ||
|
||
{#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/nSkq35VUf5" }] as { name, url }} | ||
<a | ||
href={url} | ||
data-sveltekit-reload | ||
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,43 @@ | ||
<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 p-4" | ||
> | ||
<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 font-bold" | ||
>{isMainnetValue ? "Mainnet" : "Devnet"}</span | ||
> | ||
</div> |
Oops, something went wrong.