This commit is contained in:
Manav Rathi
2025-02-07 09:31:30 +05:30
parent b87b68e9d4
commit d322f5e1bc
3 changed files with 12 additions and 4 deletions

View File

@@ -518,7 +518,7 @@ const PhotoFrame = ({
/>
)}
</AutoSizer>
{process.env.NEXT_ENTE_WIP_PS5 && <FileViewer />}
{process.env.NEXT_PUBLIC_ENTE_WIP_PS5 && <FileViewer />}
<PhotoViewer
isOpen={open}
items={displayFiles}

View File

@@ -2,12 +2,20 @@
//
// Needs yarn workspace gallery add photoswipe@^5.4.4 (not committed yet).
if (process.env.NEXT_PUBLIC_ENTE_WIP_PS5) {
console.warn("Using WIP upstream photoswipe");
} else {
throw new Error("Whoa");
}
import { Button } from "@mui/material";
export const FileViewer: React.FC = () => {
const FileViewer: React.FC = () => {
return (
<div>
Hello<Button>Test</Button>
</div>
);
};
export default FileViewer;

View File

@@ -13,11 +13,11 @@ import { aboveGalleryContentZ } from "./utils/z-index";
import dynamic from "next/dynamic";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const FV5 = dynamic(() => import("./FileViewer5"));
const FV5 = dynamic(() => import("./FileViewer5"), { ssr: false });
const FVD = () => <></>;
export const FileViewer: React.FC = (props) => {
return process.env.NEXT_ENTE_WIP_PS5 ? <FV5 {...props} /> : <FVD />;
return process.env.NEXT_PUBLIC_ENTE_WIP_PS5 ? <FV5 {...props} /> : <FVD />;
};
type ConfirmDeleteFileDialogProps = ModalVisibilityProps & {