a tool for shared writing and social publishing

add states for logged out

+8 -23
-4
app/(home-pages)/home/HomeEmpty/HomeEmpty.tsx
··· 55 55 56 56 <PublicationBanner /> 57 57 <DiscoverBanner /> 58 - <div className="text-tertiary italic text-sm font-normal -mt-2"> 59 - Right now docs and publications are separate. Soon you'll be able to add 60 - docs to pubs! 61 - </div> 62 58 </div> 63 59 ); 64 60 }
+4 -16
components/ActionBar/MobileNavigation.tsx
··· 1 - import { MenuSmall } from "components/Icons/MenuSmall"; 2 1 import { useIdentityData } from "components/IdentityProvider"; 3 2 import { Popover } from "components/Popover"; 4 3 import { Separator } from "components/Layout"; ··· 10 9 WriterButton, 11 10 } from "./NavigationButtons"; 12 11 import { PubIcon, PublicationButtons } from "./Publications"; 13 - import { HomeSmall } from "components/Icons/HomeSmall"; 14 - import { ReaderReadSmall } from "components/Icons/ReaderSmall"; 15 12 import { LooseLeafSmall } from "components/Icons/LooseleafSmall"; 16 13 import { normalizePublicationRecord } from "src/utils/normalizeRecords"; 17 - import { 18 - NotificationsReadSmall, 19 - NotificationsUnreadSmall, 20 - } from "components/Icons/NotificationSmall"; 21 - import { TagSmall } from "components/Icons/TagSmall"; 22 - import { Avatar } from "components/Avatar"; 23 - import { useProfileFromDid } from "src/utils/getRecordFromDid"; 24 14 import { LoginActionButton } from "components/LoginButton"; 25 15 import { ButtonPrimary } from "components/Buttons"; 26 16 ··· 68 58 <LooseLeafSmall className="scale-[75%]" /> 69 59 </div> 70 60 ); 71 - } else 72 - return ( 73 - <ButtonPrimary compact className="text-sm!"> 74 - Create a Publication! 75 - </ButtonPrimary> 76 - ); 61 + } 62 + if (identity) { 63 + return <ButtonPrimary>Create a Pub!</ButtonPrimary>; 64 + } else return; 77 65 } 78 66 79 67 return (
-1
components/ActionBar/NavigationButtons.tsx
··· 85 85 subs: boolean; 86 86 compactOnMobile?: boolean; 87 87 }) => { 88 - if (!props.subs) return; 89 88 return ( 90 89 <SpeedyLink href={"/reader"} className="hover:no-underline!"> 91 90 <ActionButton
+4 -2
components/LoginButton.tsx
··· 5 5 import { ButtonPrimary } from "./Buttons"; 6 6 import { ActionButton } from "./ActionBar/ActionButton"; 7 7 import { AccountSmall } from "./Icons/AccountSmall"; 8 + import { useIsMobile } from "src/hooks/isMobile"; 8 9 9 10 export function LoginButton() { 10 11 let identityData = useIdentityData(); ··· 26 27 export function LoginActionButton() { 27 28 let identityData = useIdentityData(); 28 29 if (identityData.identity) return null; 30 + let isMobile = useIsMobile(); 29 31 return ( 30 32 <Popover 31 33 asChild 32 - align="start" 33 - side="right" 34 + side={isMobile ? "top" : "right"} 35 + align={isMobile ? "center" : "start"} 34 36 trigger={ 35 37 <ActionButton secondary icon={<AccountSmall />} label="Sign In" /> 36 38 }