forked from cerc-io/snowballtools-base
org slug
This commit is contained in:
parent
effa0bbf14
commit
61c8846400
@ -25,6 +25,12 @@ const ProjectSearch = () => {
|
|||||||
fetchUser();
|
fetchUser();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const fetchOrgSlug = useCallback(async () => {
|
||||||
|
const { organizations } = await client.getOrganizations();
|
||||||
|
// TODO: Get the selected organization. This is temp
|
||||||
|
return organizations[0].slug;
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="sticky top-0 bg-white z-30">
|
<div className="sticky top-0 bg-white z-30">
|
||||||
@ -38,7 +44,15 @@ const ProjectSearch = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button variant={'secondary'} iconOnly>
|
<Button
|
||||||
|
variant={'secondary'}
|
||||||
|
iconOnly
|
||||||
|
onClick={() => {
|
||||||
|
fetchOrgSlug().then((organizationSlug) => {
|
||||||
|
navigate(`/${organizationSlug}/projects/create`);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
<PlusIcon />
|
<PlusIcon />
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant={'ghost'} iconOnly>
|
<Button variant={'ghost'} iconOnly>
|
||||||
|
Loading…
Reference in New Issue
Block a user