|
1 | 1 | "use client"; |
2 | 2 |
|
3 | | -import { useState } from "react"; |
4 | 3 | import Image from "next/image"; |
| 4 | +import { useState } from "react"; |
5 | 5 |
|
| 6 | +import { Avatar, Button, Input } from "@cap/ui"; |
| 7 | +import { faEdit, faLayerGroup, faPlus, faTrash } from "@fortawesome/free-solid-svg-icons"; |
| 8 | +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
6 | 9 | import { Search } from "lucide-react"; |
7 | | -import { Input } from "@cap/ui"; |
8 | 10 | import { useRouter } from "next/navigation"; |
9 | | -import { Button, Avatar } from "@cap/ui"; |
10 | | -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
11 | | -import { faEdit, faLayerGroup, faPlus, faTrash } from "@fortawesome/free-solid-svg-icons"; |
12 | | -import SpaceDialog from "../../_components/Navbar/SpaceDialog"; |
13 | 11 | import { ConfirmationDialog } from "../../_components/ConfirmationDialog"; |
| 12 | +import SpaceDialog from "../../_components/Navbar/SpaceDialog"; |
14 | 13 |
|
15 | | -import { Spaces } from "../../dashboard-data"; |
16 | 14 | import { deleteSpace } from "@/actions/organization/delete-space"; |
17 | | -import { toast } from "sonner"; |
18 | 15 | import { useParams } from "next/navigation"; |
| 16 | +import { toast } from "sonner"; |
19 | 17 | import { useDashboardContext } from "../../Contexts"; |
| 18 | +import { Spaces } from "../../dashboard-data"; |
20 | 19 |
|
21 | 20 | export default function BrowseSpacesPage() { |
22 | 21 | const { spacesData, user, activeOrganization } = useDashboardContext(); |
@@ -70,29 +69,15 @@ export default function BrowseSpacesPage() { |
70 | 69 |
|
71 | 70 | return ( |
72 | 71 | <> |
73 | | - <div> |
74 | | - <div className="flex flex-wrap gap-3 justify-between items-start mb-4 w-full"> |
75 | | - <Button |
76 | | - onClick={() => setShowSpaceDialog(true)} |
77 | | - size="sm" |
78 | | - variant="dark" |
79 | | - > |
80 | | - <FontAwesomeIcon className="size-3" icon={faPlus} /> |
81 | | - Create Space |
82 | | - </Button> |
83 | | - <div className="flex relative w-full max-w-md"> |
84 | | - <div className="flex absolute inset-y-0 left-3 items-center pointer-events-none"> |
85 | | - <Search className="size-4 text-gray-9" /> |
86 | | - </div> |
87 | | - <Input |
88 | | - type="text" |
89 | | - placeholder="Search spaces..." |
90 | | - className="flex-1 pr-3 pl-8 w-full min-w-full text-sm placeholder-gray-8" |
91 | | - value={searchQuery} |
92 | | - onChange={(e) => setSearchQuery(e.target.value)} |
93 | | - /> |
94 | | - </div> |
95 | | - </div> |
| 72 | + <div className="flex flex-wrap gap-3 justify-between items-start w-full"> |
| 73 | + <Button |
| 74 | + onClick={() => setShowSpaceDialog(true)} |
| 75 | + size="sm" |
| 76 | + variant="dark" |
| 77 | + > |
| 78 | + <FontAwesomeIcon className="size-3" icon={faPlus} /> |
| 79 | + Create Space |
| 80 | + </Button> |
96 | 81 | <div className="flex relative w-full max-w-md"> |
97 | 82 | <div className="flex absolute inset-y-0 left-3 items-center pointer-events-none"> |
98 | 83 | <Search className="size-4 text-gray-9" /> |
|
0 commit comments