Skip to content

Commit

Permalink
fix/WG-436: use system path during project creation (#330)
Browse files Browse the repository at this point in the history
* Use system path on file creation

* Use depenencies

* Fix display of my data and ds project names

* Fix path
  • Loading branch information
nathanfranklin authored Feb 18, 2025
1 parent a4c7601 commit 0211a93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions react/src/components/CreateMapModal/CreateMapModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const CreateMapModal = ({ isOpen, closeModal }: CreateMapModalProps) => {
setValue('systemFile', systemFilename);
oldSystemFilename.current = systemFilename;
}
}, [mapName]);
}, [getValues, mapName, setValue]);

const handleClose = () => {
setErrorMessage('');
Expand Down Expand Up @@ -142,7 +142,7 @@ const CreateMapModal = ({ isOpen, closeModal }: CreateMapModalProps) => {
description: values.description,
system_file: values.systemFile,
system_id: values.systemId,
system_path: `/${userData.username}`,
system_path: values.systemPath,
watch_content: values.syncFolder,
watch_users: values.syncFolder,
};
Expand Down
8 changes: 4 additions & 4 deletions react/src/components/ManageMapProjectPanel/SaveTabContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SaveTabContent: React.FC<SaveTabProps> = ({ project }) => {

if (project.system_id) {
if (project.system_id.startsWith('project')) {
dsFolderHref = `${dsDataDepotUrl}projects/${dsProj?.value.projectId}${project.system_path}`;
dsFolderHref = `${dsDataDepotUrl}projects/${dsProj?.value.projectId}/${project.system_path}`;

if (project.system_file) {
dsProjectHref = `${dsDataDepotUrl}projects/${dsProj?.value.projectId}`;
Expand Down Expand Up @@ -98,9 +98,9 @@ const SaveTabContent: React.FC<SaveTabProps> = ({ project }) => {
rel="noreferrer"
style={{ padding: 0 }}
>
{dsProj?.value.projectId}
{dsProj.value.projectId}
{' | '}
{project.name}
{dsProj.value.title}
</Button>
) : (
<Button
Expand All @@ -110,7 +110,7 @@ const SaveTabContent: React.FC<SaveTabProps> = ({ project }) => {
rel="noreferrer"
style={{ padding: 0 }}
>
{project.system_id}
My Data
</Button>
)}
</>
Expand Down

0 comments on commit 0211a93

Please sign in to comment.