diff --git a/app/[leaflet_id]/actions/PublishButton.tsx b/app/[leaflet_id]/actions/PublishButton.tsx
index ea7160d5..3d832912 100644
--- a/app/[leaflet_id]/actions/PublishButton.tsx
+++ b/app/[leaflet_id]/actions/PublishButton.tsx
@@ -5,9 +5,12 @@ import {
PubIcon,
PubListEmptyContent,
} from "components/ActionBar/Publications";
+import { ButtonPrimary, ButtonTertiary } from "components/Buttons";
+import { AddSmall } from "components/Icons/AddSmall";
import { LooseLeafSmall } from "components/Icons/ArchiveSmall";
import { PublishSmall } from "components/Icons/PublishSmall";
import { useIdentityData } from "components/IdentityProvider";
+import { InputWithLabel } from "components/Input";
import { Menu, MenuItem } from "components/Layout";
import { useLeafletPublicationData } from "components/PageSWRDataProvider";
import { Popover } from "components/Popover";
@@ -19,6 +22,7 @@ import { useParams, useRouter } from "next/navigation";
import { useState } from "react";
import { useIsMobile } from "src/hooks/isMobile";
import { useReplicache } from "src/replicache";
+import { Json } from "supabase/database.types";
export const PublishButton = () => {
let { data: pub } = useLeafletPublicationData();
@@ -90,70 +94,155 @@ const PublishToPublication = () => {
let hasPubs =
identity && identity.atp_did && identity.publications.length > 0;
- if (!hasPubs)
- return (
-
}
- label={"Publish on ATP"}
- />
- }
- >
-
Publish to…
- {identity?.publications?.map((d) => {
- return (
-
- );
- })}
-
-
-
- );
- else
- return (
- }
- label={"Publish on ATP"}
- />
- }
- >
- {/* this component is also used on Home to populate the sidebar when PubList is empty */}
- {/* however, this component needs to redirect to sign in, pub creation, AND publish so we might need to just make a new component */}
+ return (
+ }
+ label={"Publish on ATP"}
+ />
+ }
+ >
+ {!identity || !identity.atp_did ? (
+ // this component is also used on Home to populate the sidebar when PubList is empty
+ // when user doesn't have an AT Proto account, and redirects back to the doc (hopefully with publish open?
+