Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/features/projectList/ProjectCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { memo } from 'react';
import { Project } from '@prisma/client';
import { Clock } from 'lucide-react';
import Link from 'next/link';

import { cn } from '@/lib/utils';
import { Project } from '@/types/project';

interface ProjectCardProps {
project: Project;
Expand Down
5 changes: 2 additions & 3 deletions hooks/use-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Provides automatic caching, refetching, and state synchronization
*/

import type { Project } from '@prisma/client';
import { useQuery } from '@tanstack/react-query';

import { GET } from '@/lib/fetch-client';
import type { Project } from '@/types/project';

interface UseProjectsOptions {
/** Enable automatic refetching every 3 seconds */
Expand All @@ -33,8 +33,7 @@ export function useProjects(options: UseProjectsOptions = {}) {
const url = namespace
? `/api/projects?namespace=${encodeURIComponent(namespace)}`
: '/api/projects';
const data = await GET<Project[]>(url);
return data;
return GET<Project[]>(url);
},
refetchInterval,
refetchOnWindowFocus,
Expand Down
8 changes: 0 additions & 8 deletions types/project.ts

This file was deleted.