-
{
- if (hasUnsavedChanges) {
- setShowLeaveWarning(true);
- } else {
- router.push(settingsHref);
- }
- }}
- >
-
-
- }
- >
- Discard unsaved changes?
-
- You have unsaved changes to your theme. Leaving the page will
- lose your edits!
-
-
- router.push(settingsHref)}
- >
- Discard and Leave
-
-
-
-
+
["localPubTheme"];
+ headingFont: ReturnType["headingFont"];
+ bodyFont: ReturnType["bodyFont"];
+ image: ReturnType["image"];
+ pageWidth: ReturnType["pageWidth"];
+}) => {
+ let router = useRouter();
+ let [open, setOpen] = useState(false);
+ if (props.hasUnsavedChanges)
+ return (
+
+
+ Back To Settings
+
+ }
+ >
+
+
+
Discard unsaved changes?
+
+ You have unsaved changes to your theme. Leaving the page will lose
+ your edits!
+
+
+ router.push(props.settingsHref)}
+ >
+ Discard and Leave
+
+
+
+
+
+
+
+ );
+ else
+ return (
+
+
+
+ Back To Settings
+
+
+ );
+};
+
const PubThemePopover = ({
state,
toolbarRef,
@@ -183,15 +215,6 @@ const PubThemePopover = ({
side="bottom"
arrowFill="white"
border="#CCCCCC"
- onInteractOutside={(e) => {
- if (
- toolbarRef.current &&
- e.target instanceof Node &&
- toolbarRef.current.contains(e.target)
- ) {
- e.preventDefault();
- }
- }}
className="sm:w-sm w-[1000px] rounded-lg! !p-0 bg-white! border-[#CCCCCC]!"
trigger={