Fix types + lint
This commit is contained in:
parent
399d13ce01
commit
f672830d9e
6 changed files with 789 additions and 785 deletions
|
|
@ -11,6 +11,7 @@ import {
|
|||
type WeeklyAvailability,
|
||||
} from "../helpers/slots.js";
|
||||
import type { BaseEnv } from "../types/app.types.js";
|
||||
|
||||
// import { MiddlewareManager } from "../middlewares/middleware.js";
|
||||
|
||||
const factory = createFactory<BaseEnv>();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import type { Database } from "@xtablo/shared-types";
|
||||
import { Badge } from "@xtablo/ui/components/badge";
|
||||
import { Button } from "@xtablo/ui/components/button";
|
||||
import {
|
||||
|
|
@ -13,21 +14,20 @@ import {
|
|||
} from "@xtablo/ui/components/typography";
|
||||
import {
|
||||
BellIcon,
|
||||
CheckCheckIcon,
|
||||
CalendarIcon,
|
||||
CheckCheckIcon,
|
||||
FileTextIcon,
|
||||
KanbanIcon,
|
||||
LayoutDashboardIcon,
|
||||
UserPlusIcon,
|
||||
MailIcon,
|
||||
UserPlusIcon,
|
||||
XIcon,
|
||||
} from "lucide-react";
|
||||
import { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useNotifications, useNotificationsSubscription } from "../hooks/notifications";
|
||||
import type { Database } from "@xtablo/shared-types";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
import { useNotifications, useNotificationsSubscription } from "../hooks/notifications";
|
||||
|
||||
type Notification = Database["public"]["Tables"]["notifications"]["Row"];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { supabase } from "../lib/supabase";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import type { Database } from "@xtablo/shared-types";
|
||||
import { supabase } from "../lib/supabase";
|
||||
|
||||
type Notification = Database["public"]["Tables"]["notifications"]["Row"];
|
||||
|
||||
|
|
@ -8,7 +8,12 @@ export function useNotifications() {
|
|||
const queryClient = useQueryClient();
|
||||
|
||||
// Fetch unread notifications
|
||||
const { data: notifications = [], isLoading, error, refetch } = useQuery({
|
||||
const {
|
||||
data: notifications = [],
|
||||
isLoading,
|
||||
error,
|
||||
refetch,
|
||||
} = useQuery({
|
||||
queryKey: ["notifications", "unread"],
|
||||
queryFn: async () => {
|
||||
const { data, error } = await supabase
|
||||
|
|
@ -67,7 +72,11 @@ export function useNotifications() {
|
|||
|
||||
// Hook to fetch all notifications (including read ones)
|
||||
export function useAllNotifications(limit = 50) {
|
||||
const { data: notifications = [], isLoading, error } = useQuery({
|
||||
const {
|
||||
data: notifications = [],
|
||||
isLoading,
|
||||
error,
|
||||
} = useQuery({
|
||||
queryKey: ["notifications", "all", limit],
|
||||
queryFn: async () => {
|
||||
const { data, error } = await supabase
|
||||
|
|
@ -116,4 +125,3 @@ export function useNotificationsSubscription() {
|
|||
|
||||
return { setupSubscription };
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -16,9 +16,9 @@ export type {
|
|||
// Kanban Types
|
||||
// ============================================================================
|
||||
export type {
|
||||
Etape,
|
||||
DragItem,
|
||||
DropResult,
|
||||
Etape,
|
||||
KanbanBoard,
|
||||
KanbanColumn,
|
||||
KanbanColumnUpdate,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ export type KanbanTask = RemoveNullFromObject<
|
|||
"id" | "tablo_id" | "is_parent"
|
||||
>;
|
||||
|
||||
export type Etape = RemoveNullFromObject<Tables<"tasks">, "id" | "tablo_id" | "title" | "is_parent">;
|
||||
export type Etape = RemoveNullFromObject<
|
||||
Tables<"tasks">,
|
||||
"id" | "tablo_id" | "title" | "is_parent"
|
||||
>;
|
||||
|
||||
export interface KanbanColumn {
|
||||
id: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue