Fix TypeScript errors in auctions, dashboard, and api
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
- Made Auction.valuation optional (API doesn't always return it) - Fixed domain.notify to domain.notify_on_available in dashboard - Changed api.request from private to protected for inheritance
This commit is contained in:
@ -49,7 +49,7 @@ interface Auction {
|
|||||||
age_years: number | null
|
age_years: number | null
|
||||||
tld: string
|
tld: string
|
||||||
affiliate_url: string
|
affiliate_url: string
|
||||||
valuation: AuctionValuation | null
|
valuation?: AuctionValuation | null
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Opportunity {
|
interface Opportunity {
|
||||||
|
|||||||
@ -682,17 +682,17 @@ export default function DashboardPage() {
|
|||||||
<Sparkles className="w-4 h-4" />
|
<Sparkles className="w-4 h-4" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => handleToggleNotify(domain.id, domain.notify)}
|
onClick={() => handleToggleNotify(domain.id, domain.notify_on_available)}
|
||||||
disabled={togglingNotifyId === domain.id}
|
disabled={togglingNotifyId === domain.id}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"p-2 rounded-lg transition-all",
|
"p-2 rounded-lg transition-all",
|
||||||
domain.notify
|
domain.notify_on_available
|
||||||
? "text-accent hover:text-accent-hover hover:bg-accent-muted"
|
? "text-accent hover:text-accent-hover hover:bg-accent-muted"
|
||||||
: "text-foreground-subtle hover:text-foreground hover:bg-background-tertiary"
|
: "text-foreground-subtle hover:text-foreground hover:bg-background-tertiary"
|
||||||
)}
|
)}
|
||||||
title={domain.notify ? "Notifications on" : "Notifications off"}
|
title={domain.notify_on_available ? "Notifications on" : "Notifications off"}
|
||||||
>
|
>
|
||||||
<Bell className={clsx("w-4 h-4", domain.notify && "fill-current", togglingNotifyId === domain.id && "animate-pulse")} />
|
<Bell className={clsx("w-4 h-4", domain.notify_on_available && "fill-current", togglingNotifyId === domain.id && "animate-pulse")} />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => handleRefresh(domain.id)}
|
onClick={() => handleRefresh(domain.id)}
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class ApiClient {
|
|||||||
return this.token
|
return this.token
|
||||||
}
|
}
|
||||||
|
|
||||||
private async request<T>(
|
protected async request<T>(
|
||||||
endpoint: string,
|
endpoint: string,
|
||||||
options: RequestInit = {}
|
options: RequestInit = {}
|
||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
|
|||||||
Reference in New Issue
Block a user