Skip to content

Commit

Permalink
feat: implement user dashboard and fixes linting errors (kindfi-org#110)
Browse files Browse the repository at this point in the history
* fix: kebab case for userdashboard types and linting errors

* fix: build issues

---------

Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Bran18 <[email protected]>
  • Loading branch information
3 people authored and JoE11-y committed Feb 5, 2025
1 parent 2536f93 commit 056913a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apps/web/components/sections/user/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
mockImpactMetrics,
mockProjects,
} from '~/lib/mock-data/mock-user-dashboard'
import type { ImpactMetric, Project } from '~/lib/types/user-dashboard'
import type { ImpactMetric, ProjectDetails } from '~/lib/types/user-dashboard'

export function UserDashboard() {
return (
Expand Down Expand Up @@ -111,7 +111,7 @@ export function UserDashboard() {
</div>
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
{mockProjects.map((project: Project) => (
{mockProjects.map((project: ProjectDetails) => (
<ProjectCard key={project.id} {...project} />
))}
</div>
Expand All @@ -128,7 +128,7 @@ export function UserDashboard() {
</Button>
</div>
<div className="space-y-4">
{mockProjects.map((project: Project) => {
{mockProjects.map((project: ProjectDetails) => {
const formattedDate = new Date().toLocaleDateString(undefined, {
year: 'numeric',
month: 'long',
Expand Down
4 changes: 2 additions & 2 deletions apps/web/lib/mock-data/mock-user-dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BarChart2, Users, Wallet } from 'lucide-react'
import type { ImpactMetric, Project } from '~/lib/types/user-dashboard'
import type { ImpactMetric, ProjectDetails } from '~/lib/types/user-dashboard'

export const mockProjects: Project[] = [
export const mockProjects: ProjectDetails[] = [
{
id: 'healthy-kids-id',
image: '/images/kids.webp',
Expand Down
1 change: 1 addition & 0 deletions apps/web/lib/stellar/escrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export async function initializeEscrowContract(
// Generate unique IDs
const engagementId = generateUniqueId()
const contributionId = generateUniqueId()

// Initialize contract on Stellar
const payerAccount = new Account(
Keypair.fromSecret(params.parties.payer).publicKey(),
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/types/user-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface Tag {
text: string
}

export interface Project {
export interface ProjectDetails {
id: string
image: string
category: string
Expand Down

0 comments on commit 056913a

Please sign in to comment.