diff --git a/client/modules/_hooks/src/datafiles/projects/types.ts b/client/modules/_hooks/src/datafiles/projects/types.ts
index 29f27e6813..55415964e2 100644
--- a/client/modules/_hooks/src/datafiles/projects/types.ts
+++ b/client/modules/_hooks/src/datafiles/projects/types.ts
@@ -160,6 +160,7 @@ export type TPreviewTreeData = {
uuid: string;
value: TEntityValue;
order: number;
+ version?: number;
publicationDate?: string;
children: TPreviewTreeData[];
};
diff --git a/client/modules/datafiles/src/projects/ProjectCitation/ProjectCitation.tsx b/client/modules/datafiles/src/projects/ProjectCitation/ProjectCitation.tsx
index 6fd4f87488..2bd28c938a 100644
--- a/client/modules/datafiles/src/projects/ProjectCitation/ProjectCitation.tsx
+++ b/client/modules/datafiles/src/projects/ProjectCitation/ProjectCitation.tsx
@@ -67,8 +67,8 @@ export const PublishedCitation: React.FC<{
)
.join(', ')}{' '}
({new Date(entityDetails.publicationDate).getFullYear()}). "
- {entityDetails.value.title}", in {data.baseProject.title}.
- DesignSafe-CI.{' '}
+ {entityDetails.value.title}", in {data.baseProject.title}
+ {(version ?? 1) > 1 && [Version {version}]}. DesignSafe-CI.{' '}
{doi && (
) : (
-
{citationMetrics && (
diff --git a/client/src/datafiles/layouts/published/PublishedDetailLayout.tsx b/client/src/datafiles/layouts/published/PublishedDetailLayout.tsx
index 2de053ad81..0319b8f218 100644
--- a/client/src/datafiles/layouts/published/PublishedDetailLayout.tsx
+++ b/client/src/datafiles/layouts/published/PublishedDetailLayout.tsx
@@ -50,6 +50,11 @@ export const PublishedDetailLayout: React.FC = () => {
const { data, isError } = usePublicationDetail(projectId ?? '');
const { allVersions } = usePublicationVersions(projectId ?? '');
const version = (projectId ?? '').split('v')[1];
+ const selectedVersion =
+ version ||
+ searchParams.get('version') ||
+ Math.max(...allVersions).toString();
+
useEffect(() => {
if (version) {
const newSearchParams = new URLSearchParams(searchParams);
@@ -62,11 +67,6 @@ export const PublishedDetailLayout: React.FC = () => {
useEffect(() => {
if (!data) return;
- const selectedVersion =
- version ||
- searchParams.get('version') ||
- Math.max(...allVersions).toString();
-
data?.baseProject.projectType !== 'other' &&
apiClient.get(
`/api/datafiles/tapis/public/listing/designsafe.storage.published/${projectId}${
@@ -75,7 +75,7 @@ export const PublishedDetailLayout: React.FC = () => {
: ''
}`
);
- }, [data, allVersions, searchParams, version, projectId]);
+ }, [data, selectedVersion, searchParams, projectId]);
if (isError) {
return (
@@ -171,6 +171,7 @@ export const PublishedDetailLayout: React.FC = () => {