Merge pull request #121 from snowball-tools/search-area-plus

This commit is contained in:
Vivian Phung 2024-02-27 09:18:03 -05:00 committed by GitHub
commit aa0ca8dd21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,6 +25,12 @@ const ProjectSearch = () => {
fetchUser();
}, []);
const fetchOrgSlug = useCallback(async () => {
const { organizations } = await client.getOrganizations();
// TODO: Get the selected organization. This is temp
return organizations[0].slug;
}, []);
return (
<div>
<div className="sticky top-0 bg-white z-30">
@ -38,7 +44,15 @@ const ProjectSearch = () => {
}}
/>
</div>
<Button variant={'secondary'} iconOnly>
<Button
variant={'secondary'}
iconOnly
onClick={() => {
fetchOrgSlug().then((organizationSlug) => {
navigate(`/${organizationSlug}/projects/create`);
});
}}
>
<PlusIcon />
</Button>
<Button variant={'ghost'} iconOnly>