Switch to absolute imports

This commit is contained in:
Jon Staab
2026-03-27 13:11:31 -07:00
parent 4611baec9d
commit 23221497d5
27 changed files with 140 additions and 133 deletions
+28 -28
View File
@@ -1,4 +1,4 @@
import { account } from "./hooks"
import { account } from "@/lib/state"
const API_URL = import.meta.env.VITE_API_URL
@@ -51,33 +51,6 @@ export type Relay = {
push_enabled: number
}
export type Tenant = {
pubkey: string
nwc_url: string
created_at: number
billing_anchor: number
}
export type Invoice = {
id: string
tenant: string
status: string
created_at: number
attempted_at: number
error: string
closed_at: number
sent_at: number
paid_at: number
bolt11: string
period_start: number
period_end: number
}
export type Identity = {
pubkey: string
is_admin: boolean
}
export type CreateRelayInput = {
tenant?: string
subdomain: string
@@ -109,6 +82,33 @@ export type UpdateRelayInput = {
push_enabled?: number
}
export type Tenant = {
pubkey: string
nwc_url: string
created_at: number
billing_anchor: number
}
export type Invoice = {
id: string
tenant: string
status: string
created_at: number
attempted_at: number
error: string
closed_at: number
sent_at: number
paid_at: number
bolt11: string
period_start: number
period_end: number
}
export type Identity = {
pubkey: string
is_admin: boolean
}
export async function makeAuth(): Promise<string | undefined> {
const current = account()
if (!current) return undefined
+2 -17
View File
@@ -19,23 +19,8 @@ import {
type Relay,
type Tenant,
type UpdateRelayInput,
} from "./api"
import { account, eventStore, pool } from "./state"
export {
PLATFORM_NAME,
accountManager,
account,
setAccount,
identity,
refetchIdentity,
setIdentity,
eventStore,
pool,
type EventSigner,
type SignedEvent,
type UnsignedEvent,
} from "./state"
} from "@/lib/api"
import { account, eventStore, pool } from "@/lib/state"
export function useProfilePicture(pubkey: () => string | undefined) {
const [picture, setPicture] = createSignal<string | undefined>()
+1 -1
View File
@@ -6,7 +6,7 @@ import { EventStore } from "applesauce-core"
import { createEventLoaderForStore } from "applesauce-loaders/loaders"
import { RelayPool } from "applesauce-relay"
import { NostrConnectSigner } from "applesauce-signers"
import { getIdentity } from "./api"
import { getIdentity } from "@/lib/api"
export type UnsignedEvent = {
kind: number