Take 2
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 & {
|
||||
|
||||
Reference in New Issue
Block a user