Rename Organization to Project

We'll probably need a concept of organizations at some point in the future, but in practice the way we're using these in the codebase right now is as a project, so this renames it to that to avoid confusion.
This commit is contained in:
Kyle Corbitt
2023-08-09 15:49:19 -07:00
parent ac99c8e0f7
commit 16aa6672fc
30 changed files with 292 additions and 248 deletions

View File

@@ -10,15 +10,15 @@ export const useOnForkButtonPressed = () => {
const user = useSession().data;
const experiment = useExperiment();
const selectedOrgId = useAppStore((state) => state.selectedOrgId);
const selectedProjectId = useAppStore((state) => state.selectedProjectId);
const forkMutation = api.experiments.fork.useMutation();
const [onFork, isForking] = useHandledAsyncCallback(async () => {
if (!experiment.data?.id || !selectedOrgId) return;
if (!experiment.data?.id || !selectedProjectId) return;
const forkedExperimentId = await forkMutation.mutateAsync({
id: experiment.data.id,
organizationId: selectedOrgId,
projectId: selectedProjectId,
});
await router.push({ pathname: "/experiments/[id]", query: { id: forkedExperimentId } });
}, [forkMutation, experiment.data?.id, router]);