mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
14 lines
319 B
TypeScript
14 lines
319 B
TypeScript
import useProjects from 'sentry/utils/useProjects';
|
|
|
|
interface Props {
|
|
project_id: string | undefined;
|
|
}
|
|
|
|
export default function useProjectFromId({project_id}: Props) {
|
|
const {projects} = useProjects();
|
|
if (project_id) {
|
|
return projects.find(p => p.id === project_id) ?? undefined;
|
|
}
|
|
return undefined;
|
|
}
|