{notifications.map((n) => {
if (n.type === "comment") {
diff --git a/app/lish/[did]/[publication]/invite-contributor/content.tsx b/app/lish/[did]/[publication]/invite-contributor/content.tsx
new file mode 100644
index 00000000..23a76ed5
--- /dev/null
+++ b/app/lish/[did]/[publication]/invite-contributor/content.tsx
@@ -0,0 +1,80 @@
+import { PubLeafletPublication } from "lexicons/api";
+import { ButtonPrimary } from "components/Buttons";
+import { PubIcon } from "components/ActionBar/Publications";
+import { SpeedyLink } from "components/SpeedyLink";
+import { BlueskyLogin } from "app/login/LoginForm";
+
+export const InvitedContent = (props: {
+ pubRecord: PubLeafletPublication.Record;
+ uri: string | undefined;
+ href: string;
+}) => {
+ return (
+ <>
+
Become a Contributor!
+
+
+ You've been invited to write for
+ {props.pubRecord.name}!{" "}
+
+
Accept Invite
+ >
+ );
+};
+
+export const NotInvitedContent = (props: {
+ pubRecord: PubLeafletPublication.Record;
+ uri: string | undefined;
+ href: string;
+}) => {
+ return (
+ <>
+
You haven't been invited to contribute yet...
+
+
+
+ If you are expecting an invite, please check that the owner of this
+ publication added you to the invited contributors list.
+
+ >
+ );
+};
+
+export const LoggedOutContent = (props: {
+ pubRecord: PubLeafletPublication.Record;
+ uri: string | undefined;
+ href: string;
+}) => {
+ return (
+ <>
+
Log in to Contribute
+
+
+ Log in with an AT Proto handle to contribute this publication
+
+
+ >
+ );
+};
+
+const PubLink = (props: {
+ pubRecord: PubLeafletPublication.Record;
+ uri: string | undefined;
+ href: string;
+}) => {
+ return (
+
+
+ {props.pubRecord.name}
+ {props.pubRecord.description}
+
+ );
+};
diff --git a/app/lish/[did]/[publication]/invite-contributor/page.tsx b/app/lish/[did]/[publication]/invite-contributor/page.tsx
index 04557915..9904ad26 100644
--- a/app/lish/[did]/[publication]/invite-contributor/page.tsx
+++ b/app/lish/[did]/[publication]/invite-contributor/page.tsx
@@ -5,13 +5,10 @@ import {
} from "components/ThemeManager/PublicationThemeProvider";
import { PubLeafletPublication } from "lexicons/api";
import { supabaseServerClient } from "supabase/serverClient";
-import { ButtonPrimary } from "components/Buttons";
import { PubNotFound } from "../PubNotFound";
-import { PubIcon } from "components/ActionBar/Publications";
-import { SpeedyLink } from "components/SpeedyLink";
-import { BlueskyLogin } from "app/login/LoginForm";
import { getIdentityData } from "actions/getIdentityData";
import { getPublicationURL } from "app/lish/createPub/getPublicationURL";
+import { InvitedContent, NotInvitedContent, LoggedOutContent } from "./content";
export default async function Publication(props: {
params: Promise<{ publication: string; did: string }>;
@@ -71,19 +68,19 @@ export default async function Publication(props: {
) : invited ? (
) : (
)}
@@ -92,78 +89,3 @@ export default async function Publication(props: {
);
}
-
-const InvitedContent = (props: {
- pubRecord: PubLeafletPublication.Record;
- uri: string;
- pubUrl: string;
-}) => {
- return (
- <>
-
Become a Contributor!
-
-
- You've been invited to write for
- {props.pubRecord.name}!{" "}
-
-
Accept Invite
- >
- );
-};
-
-const NotInvitedContent = (props: {
- pubRecord: PubLeafletPublication.Record;
- uri: string;
- pubUrl: string;
-}) => {
- return (
- <>
-
You haven't been invited to contribute yet...
-
-
-
- If you are expecting an invite, please check that the owner of this
- publication added you to the invited contributors list.
-
- >
- );
-};
-
-const LoggedOutContent = (props: {
- pubRecord: PubLeafletPublication.Record;
- uri: string;
- pubUrl: string;
-}) => {
- return (
- <>
-
Log in to Contribute
-
-
- Log in with an AT Proto handle to contribute this publication
-
-
- >
- );
-};
-
-const PubLink = (props: {
- pubRecord: PubLeafletPublication.Record;
- uri: string;
- pubUrl: string;
-}) => {
- return (
-
-
- {props.pubRecord.name}
- {props.pubRecord.description}
-
- );
-};
diff --git a/components/ActionBar/Publications.tsx b/components/ActionBar/Publications.tsx
index a16f8aee..8f2a87a8 100644
--- a/components/ActionBar/Publications.tsx
+++ b/components/ActionBar/Publications.tsx
@@ -157,7 +157,7 @@ const PublishPopoverContent = () => {
export const PubIcon = (props: {
record: PubLeafletPublication.Record;
- uri: string;
+ uri: string | undefined;
small?: boolean;
large?: boolean;
className?: string;
@@ -166,7 +166,7 @@ export const PubIcon = (props: {
let iconSizeClassName = `${props.small ? "w-4 h-4" : props.large ? "w-12 h-12" : "w-6 h-6"} rounded-full`;
- return props.record.icon ? (
+ return props.record.icon && props.uri ? (
diff --git a/components/Avatar.tsx b/components/Avatar.tsx
index bc9bb6a3..7e68ecbd 100644
--- a/components/Avatar.tsx
+++ b/components/Avatar.tsx
@@ -3,12 +3,12 @@ import { AccountTiny } from "./Icons/AccountTiny";
export const Avatar = (props: {
src: string | undefined;
displayName: string | undefined;
- tiny?: boolean;
+ small?: boolean;
}) => {
if (props.src)
return (

-
+
);
};