-
- Logo (optional)
-
-
fileInputRef.current?.click()}
- >
- {iconPreview ? (
-

- ) : (
-
- )}
+
+
+
+
+ Logo (optional)
+
+
fileInputRef.current?.click()}
+ >
+ {iconPreview ? (
+

+ ) : (
+
+ )}
+
+
{
+ const file = e.target.files?.[0];
+ if (file) {
+ setIconFile(file);
+ const reader = new FileReader();
+ reader.onload = (e) => {
+ setIconPreview(e.target?.result as string);
+ };
+ reader.readAsDataURL(file);
+ }
+ }}
+ />
-
{
- const file = e.target.files?.[0];
- if (file) {
- setIconFile(file);
- const reader = new FileReader();
- reader.onload = (e) => {
- setIconPreview(e.target?.result as string);
- };
- reader.readAsDataURL(file);
- }
- }}
- />
-
-
-
-
-
-
-
-
setShowInDiscover(e.target.checked)}
- >
-
-
- Show In{" "}
-
- Discover
-
+
+
-
+
{
+ setDescriptionValue(e.currentTarget.value);
+ }}
+ />
+
-
setShowComments(e.target.checked)}
- >
-
-
Show comments on posts
-
-
-
+
+
+
+
setShowInDiscover(e.target.checked)}
+ >
+
+
+ Show In{" "}
+
+ Discover
+
+
+
+ This publication will appear on our public Discover page
+
+
+
-
- {formState === "loading" ? : "Update!"}
-
+
setShowComments(e.target.checked)}
+ >
+
+
Show comments on posts
+
+
+
);
};
diff --git a/components/ActionBar/Navigation.tsx b/components/ActionBar/Navigation.tsx
index c0af668e..63323ad6 100644
--- a/components/ActionBar/Navigation.tsx
+++ b/components/ActionBar/Navigation.tsx
@@ -19,6 +19,7 @@ import { redirect } from "next/navigation";
import { hydrateNotifications } from "src/notifications";
import { supabaseServerClient } from "supabase/serverClient";
import { CommentNotification } from "app/(home-pages)/notifications/CommentNotication";
+import { Separator } from "components/Layout";
export type navPages = "home" | "reader" | "pub" | "discover" | "notifications";
@@ -51,8 +52,6 @@ export const MobileNavigation = (props: {
);
return (
-
-
e.preventDefault()}
asChild
@@ -82,6 +81,7 @@ export const MobileNavigation = (props: {
isMobile
/>
+
);
};
diff --git a/components/Icons/GoBackSmall.tsx b/components/Icons/GoBackSmall.tsx
index 5d0cb916..3c3c36b1 100644
--- a/components/Icons/GoBackSmall.tsx
+++ b/components/Icons/GoBackSmall.tsx
@@ -8,6 +8,7 @@ export const GoBackSmall = (props: Props) => {
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
+ {...props}
>
{
- let [loading, setLoading] = useState(false);
+export const PubThemeSetter = (props: {
+ goBack: () => void;
+ loading: boolean;
+ setLoading: (l: boolean) => void;
+}) => {
let [sample, setSample] = useState<"pub" | "post">("pub");
let [openPicker, setOpenPicker] = useState("null");
let { data, mutate } = usePublicationData();
@@ -58,11 +62,10 @@ export const PubThemeSetter = () => {
return (
-
-
-
-
-
- {
- setTheme((t) => ({ ...t, bgPage: color }));
- }}
- setBackgroundColor={(color) => {
- setTheme((t) => ({ ...t, bgLeaflet: color }));
- }}
- openPicker={openPicker}
- setOpenPicker={setOpenPicker}
- hasPageBackground={!!showPageBackground}
- setHasPageBackground={setShowPageBackground}
- />
-
-
-
-
-
-
+
+
-
-
+ {
setTheme((t) => ({ ...t, bgPage: color }));
}}
- setPrimary={(color) => {
- setTheme((t) => ({ ...t, primary: color }));
+ setBackgroundColor={(color) => {
+ setTheme((t) => ({ ...t, bgLeaflet: color }));
}}
openPicker={openPicker}
- setOpenPicker={(pickers) => setOpenPicker(pickers)}
- hasPageBackground={showPageBackground}
- />
- {
- setTheme((t) => ({ ...t, accent1: color }));
- }}
- accent2={localPubTheme.accent2}
- setAccent2={(color) => {
- setTheme((t) => ({ ...t, accent2: color }));
- }}
- openPicker={openPicker}
- setOpenPicker={(pickers) => setOpenPicker(pickers)}
+ setOpenPicker={setOpenPicker}
+ hasPageBackground={!!showPageBackground}
+ setHasPageBackground={setShowPageBackground}
/>
+
+
-
-
-
Preview
-
{" "}
-
-
-
- {sample === "pub" ? (
-
- ) : (
-
- )}
+
+
+
+
+
{
+ setTheme((t) => ({ ...t, bgPage: color }));
+ }}
+ setPrimary={(color) => {
+ setTheme((t) => ({ ...t, primary: color }));
+ }}
+ openPicker={openPicker}
+ setOpenPicker={(pickers) => setOpenPicker(pickers)}
+ hasPageBackground={showPageBackground}
+ />
+ {
+ setTheme((t) => ({ ...t, accent1: color }));
+ }}
+ accent2={localPubTheme.accent2}
+ setAccent2={(color) => {
+ setTheme((t) => ({ ...t, accent2: color }));
+ }}
+ openPicker={openPicker}
+ setOpenPicker={(pickers) => setOpenPicker(pickers)}
+ />
+
+
+
+
+
Preview
+
{" "}
+
+
+ {sample === "pub" ? (
+
+ ) : (
+
+ )}
diff --git a/components/Toast.tsx b/components/Toast.tsx
index 5435781c..d7fd453c 100644
--- a/components/Toast.tsx
+++ b/components/Toast.tsx
@@ -95,18 +95,14 @@ const Toast = (props: {
from: { top: -40 },
enter: { top: 8 },
leave: { top: -40 },
- config: {
- mass: 8,
- friction: 150,
- tension: 2000,
- },
+ config: {},
});
return transitions((style, item) => {
return item ? (