import Link from "next/link"; import { t } from "@lingui/core/macro"; import { HiOutlineRectangleStack } from "react-icons/hi2"; import Button from "~/components/Button"; import PatternedBackground from "~/components/PatternedBackground"; import { useModal } from "~/providers/modal"; import { useWorkspace } from "~/providers/workspace"; import { api } from "~/utils/api"; export function BoardsList() { const { workspace } = useWorkspace(); const { openModal } = useModal(); const { data, isLoading } = api.board.all.useQuery( { workspacePublicId: workspace.publicId }, { enabled: workspace.publicId ? true : false }, ); if (isLoading) return (
); if (data?.length === 0) return (

{t`No boards`}

{t`Get started by creating a new board`}

); return (
{data?.map((board) => (

{board.name}

))}
); }