Skip to content

Commit

Permalink
chore(ceremony): pre commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Swepool committed Oct 30, 2024
1 parent a1e76e2 commit 45eecb8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
8 changes: 4 additions & 4 deletions ceremony/src/lib/components/Terminal/Activity.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import Print from "$lib/components/Terminal/Print.svelte"
import {onDestroy, onMount} from "svelte";
import {Activity} from "$lib/state/activity.svelte.ts";
import { onDestroy, onMount } from "svelte"
import { Activity } from "$lib/state/activity.svelte.ts"
let activity: Activity | null = $state(null)
Expand All @@ -11,9 +11,9 @@ onMount(() => {
onDestroy(() => {
if (activity) {
activity = null;
activity = null
}
});
})
function formatTimestamp(timestamp: string): string {
const date = new Date(timestamp)
Expand Down
58 changes: 29 additions & 29 deletions ceremony/src/lib/components/Terminal/Contributors.svelte
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<script lang="ts">
import {goto} from "$app/navigation"
import {onMount, onDestroy} from "svelte"
import Buttons from "$lib/components/Terminal/Install/Buttons.svelte"
import {Contributions} from "$lib/state/contributions.svelte.ts"
import {getState} from "$lib/state/index.svelte.ts";
import { goto } from "$app/navigation"
import { onMount, onDestroy } from "svelte"
import Buttons from "$lib/components/Terminal/Install/Buttons.svelte"
import { Contributions } from "$lib/state/contributions.svelte.ts"
import { getState } from "$lib/state/index.svelte.ts"
const { terminal } = getState()
const { terminal } = getState()
let contributions: Contributions | null = null;
let data: Array<{ text: string; action: string }> = $state([]);
let contributions: Contributions | null = null
let data: Array<{ text: string; action: string }> = $state([])
onMount(async () => {
contributions = new Contributions();
});
onMount(async () => {
contributions = new Contributions()
})
onDestroy(() => {
if (contributions) {
contributions = null;
}
});
$effect(() => {
if (contributions) {
data = contributions.data.map(contribution => ({
text: contribution.payload_id,
action: contribution.public_key_hash
}));
}
})
onDestroy(() => {
if (contributions) {
contributions = null
}
})
function trigger(value: string) {
goto(`/contributions/${value}`);
terminal.setTab(4);
terminal.setHash(value);
$effect(() => {
if (contributions) {
data = contributions.data.map(contribution => ({
text: contribution.payload_id,
action: contribution.public_key_hash
}))
}
})
function trigger(value: string) {
goto(`/contributions/${value}`)
terminal.setTab(4)
terminal.setHash(value)
}
</script>
<Buttons {data} trigger={(value) => trigger(value)}/>

0 comments on commit 45eecb8

Please sign in to comment.