@@ -13,11 +13,10 @@ import {
1313} from '@phosphor-icons/react' ;
1414import { usePathname } from 'next/navigation' ;
1515import { useState } from 'react' ;
16- import { ApiKeyCreateDialog } from '@/components/organizations/api-key-create-dialog' ;
16+
1717import { CreateOrganizationDialog } from '@/components/organizations/create-organization-dialog' ;
1818import { InviteMemberDialog } from '@/components/organizations/invite-member-dialog' ;
1919import { Button } from '@/components/ui/button' ;
20- import { Card } from '@/components/ui/card' ;
2120import { Skeleton } from '@/components/ui/skeleton' ;
2221import { useOrganizations } from '@/hooks/use-organizations' ;
2322
@@ -30,7 +29,6 @@ export function OrganizationProvider({
3029 const pathname = usePathname ( ) ;
3130 const [ showCreateDialog , setShowCreateDialog ] = useState ( false ) ;
3231 const [ showInviteMemberDialog , setShowInviteMemberDialog ] = useState ( false ) ;
33- const [ showCreateApiKeyDialog , setShowCreateApiKeyDialog ] = useState ( false ) ;
3432
3533 const getPageInfo = ( ) => {
3634 if ( pathname === '/organizations' ) {
@@ -93,11 +91,6 @@ export function OrganizationProvider({
9391 description : 'Create and manage API keys for this organization' ,
9492 icon : KeyIcon ,
9593 requiresOrg : true ,
96- actionButton : {
97- text : 'Create API Key' ,
98- icon : PlusIcon ,
99- action : ( ) => setShowCreateApiKeyDialog ( true ) ,
100- } ,
10194 } ;
10295 }
10396 if ( pathname === '/organizations/settings/danger' ) {
@@ -135,7 +128,7 @@ export function OrganizationProvider({
135128 < div className = "flex flex-col justify-between gap-3 p-4 sm:flex-row sm:items-center sm:gap-0 sm:px-6 sm:py-6" >
136129 < div className = "min-w-0 flex-1" >
137130 < div className = "flex items-center gap-4" >
138- < div className = "rounded-xl border border-primary/20 bg-primary/10 p-3" >
131+ < div className = "rounded border border-primary/20 bg-primary/10 p-3" >
139132 < Skeleton className = "h-6 w-6" />
140133 </ div >
141134 < div >
@@ -162,7 +155,7 @@ export function OrganizationProvider({
162155 < div className = "flex flex-col justify-between gap-3 p-4 sm:flex-row sm:items-center sm:gap-0 sm:px-6 sm:py-6" >
163156 < div className = "min-w-0 flex-1" >
164157 < div className = "flex items-center gap-4" >
165- < div className = "rounded-xl border border-primary/20 bg-primary/10 p-3" >
158+ < div className = "rounded border border-primary/20 bg-primary/10 p-3" >
166159 < Icon
167160 className = "h-6 w-6 text-primary"
168161 size = { 24 }
@@ -192,33 +185,29 @@ export function OrganizationProvider({
192185 </ div >
193186 </ div >
194187
195- < main className = "flex-1 overflow-y-auto p-4 sm:p-6" >
196- < div className = "mx-auto max-w-6xl" >
197- < Card className = "p-6" >
198- < div className = "text-center" >
199- < Icon
200- className = "mx-auto mb-4 h-12 w-12 text-muted-foreground"
201- size = { 48 }
202- weight = "duotone"
203- />
204- < h3 className = "mb-2 font-semibold text-lg" >
205- Select an Organization
206- </ h3 >
207- < p className = "text-muted-foreground text-sm" >
208- This feature requires an active organization.
209- </ p >
210- < div className = "mt-4" >
211- < Button
212- className = "rounded"
213- onClick = { ( ) => setShowCreateDialog ( true ) }
214- size = "sm"
215- >
216- < BuildingsIcon className = "mr-2 h-5 w-5" size = { 20 } />
217- Create organization
218- </ Button >
219- </ div >
220- </ div >
221- </ Card >
188+ < main className = "flex flex-1 items-center justify-center p-6" >
189+ < div className = "w-full max-w-md rounded-lg border bg-card p-8 text-center" >
190+ < Icon
191+ className = "mx-auto mb-4 h-12 w-12 text-muted-foreground"
192+ size = { 48 }
193+ weight = "duotone"
194+ />
195+ < h3 className = "mb-2 font-semibold text-lg" >
196+ Select an Organization
197+ </ h3 >
198+ < p className = "text-muted-foreground text-sm" >
199+ This feature requires an active organization.
200+ </ p >
201+ < div className = "mt-6" >
202+ < Button
203+ className = "rounded"
204+ onClick = { ( ) => setShowCreateDialog ( true ) }
205+ size = "default"
206+ >
207+ < BuildingsIcon className = "mr-2 h-5 w-5" size = { 20 } />
208+ Create organization
209+ </ Button >
210+ </ div >
222211 </ div >
223212 </ main >
224213 </ div >
@@ -231,7 +220,7 @@ export function OrganizationProvider({
231220 < div className = "flex flex-col justify-between gap-3 p-4 sm:flex-row sm:items-center sm:gap-0 sm:px-6 sm:py-6" >
232221 < div className = "min-w-0 flex-1" >
233222 < div className = "flex items-center gap-4" >
234- < div className = "rounded-xl border border-primary/20 bg-primary/10 p-3" >
223+ < div className = "rounded border border-primary/20 bg-primary/10 p-3" >
235224 < Icon
236225 className = "h-6 w-6 text-primary"
237226 size = { 24 }
@@ -261,9 +250,7 @@ export function OrganizationProvider({
261250 </ div >
262251 </ div >
263252
264- < main className = "flex-1 overflow-y-auto p-4 sm:p-6" >
265- < div className = "mx-auto max-w-6xl" > { children } </ div >
266- </ main >
253+ < main className = "flex-1 overflow-y-auto" > { children } </ main >
267254
268255 < CreateOrganizationDialog
269256 isOpen = { showCreateDialog }
@@ -277,14 +264,6 @@ export function OrganizationProvider({
277264 organizationId = { activeOrganization . id }
278265 />
279266 ) }
280-
281- { activeOrganization && (
282- < ApiKeyCreateDialog
283- onOpenChange = { setShowCreateApiKeyDialog }
284- open = { showCreateApiKeyDialog }
285- organizationId = { activeOrganization . id }
286- />
287- ) }
288267 </ div >
289268 ) ;
290269}
0 commit comments