jam411 3 lat temu
rodzic
commit
9edee9fccd

+ 2 - 2
packages/app/src/components/PageHistory/PageRevisionTable.tsx

@@ -52,8 +52,8 @@ export const PageRevisionTable = (props: PageRevisionTAble): JSX.Element => {
           <div className="d-lg-flex">
           <div className="d-lg-flex">
             <Revision
             <Revision
               revision={revision}
               revision={revision}
-              pageId={currentPageId}
-              pagePath={currentPagePath}
+              currentPageId={currentPageId}
+              currentPagePath={currentPagePath}
               isLatestRevision={revision === latestRevision}
               isLatestRevision={revision === latestRevision}
               hasDiff={hasDiff}
               hasDiff={hasDiff}
               key={`revision-history-rev-${revisionId}`}
               key={`revision-history-rev-${revisionId}`}

+ 4 - 4
packages/app/src/components/PageHistory/Revision.tsx

@@ -13,8 +13,8 @@ import styles from './Revision.module.scss';
 
 
 type RevisionProps = {
 type RevisionProps = {
   revision: IRevisionHasId,
   revision: IRevisionHasId,
-  pageId: string,
-  pagePath: string,
+  currentPageId: string,
+  currentPagePath: string,
   isLatestRevision: boolean,
   isLatestRevision: boolean,
   hasDiff: boolean,
   hasDiff: boolean,
   onClose: () => void,
   onClose: () => void,
@@ -24,7 +24,7 @@ export const Revision = (props: RevisionProps): JSX.Element => {
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
   const {
   const {
-    revision, pageId, pagePath, isLatestRevision, hasDiff, onClose,
+    revision, currentPageId, currentPagePath, isLatestRevision, hasDiff, onClose,
   } = props;
   } = props;
 
 
   const { returnPathForURL } = pathUtils;
   const { returnPathForURL } = pathUtils;
@@ -69,7 +69,7 @@ export const Revision = (props: RevisionProps): JSX.Element => {
           <div className="mb-1">
           <div className="mb-1">
             <UserDate dateTime={revision.createdAt} />
             <UserDate dateTime={revision.createdAt} />
             <br className="d-xl-none d-block" />
             <br className="d-xl-none d-block" />
-            <Link href={urljoin(returnPathForURL(pagePath, pageId), `?revisionId=${revision._id}`)} prefetch={false}>
+            <Link href={urljoin(returnPathForURL(currentPageId, currentPagePath), `?revisionId=${revision._id}`)} prefetch={false}>
               <a className="ml-xl-3" onClick={onClose}>
               <a className="ml-xl-3" onClick={onClose}>
                 <i className="icon-login"></i> {t('Go to this version')}
                 <i className="icon-login"></i> {t('Go to this version')}
               </a>
               </a>