a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add empty theme provider to publication page

+33 -30
+31 -28
app/lish/[handle]/[publication]/page.tsx
··· 12 12 import { DraftList } from "./DraftList"; 13 13 import { NewDraftActionButton } from "./NewDraftButton"; 14 14 import { getIdentityData } from "actions/getIdentityData"; 15 + import { ThemeProvider } from "components/ThemeManager/ThemeProvider"; 15 16 16 17 const idResolver = new IdResolver(); 17 18 ··· 61 62 62 63 try { 63 64 return ( 64 - <div className="relative max-w-prose w-full h-full mx-auto flex sm:flex-row flex-col sm:items-stretch sm:px-6"> 65 - <div className="w-12 relative"> 66 - <Sidebar className="mt-6 p-2"> 67 - <Actions publication={publication.uri} /> 68 - </Sidebar> 69 - </div> 70 - <div 71 - className={`h-full overflow-y-scroll pt-4 px-3 sm:pl-8 sm:pr-1 sm:pt-9 w-full`} 72 - > 73 - <PublicationDashboard 74 - name={publication.name} 75 - tabs={{ 76 - Drafts: ( 77 - <DraftList 78 - publication={publication.uri} 79 - drafts={publication.leaflets_in_publications} 80 - /> 81 - ), 82 - Published: <div>none yet lol</div>, 83 - }} 84 - defaultTab={"Drafts"} 85 - /> 65 + <ThemeProvider entityID={null}> 66 + <div className="relative max-w-prose w-full h-full mx-auto flex sm:flex-row flex-col sm:items-stretch sm:px-6"> 67 + <div className="w-12 relative"> 68 + <Sidebar className="mt-6 p-2"> 69 + <Actions publication={publication.uri} /> 70 + </Sidebar> 71 + </div> 72 + <div 73 + className={`h-full overflow-y-scroll pt-4 px-3 sm:pl-8 sm:pr-1 sm:pt-9 w-full`} 74 + > 75 + <PublicationDashboard 76 + name={publication.name} 77 + tabs={{ 78 + Drafts: ( 79 + <DraftList 80 + publication={publication.uri} 81 + drafts={publication.leaflets_in_publications} 82 + /> 83 + ), 84 + Published: <div>none yet lol</div>, 85 + }} 86 + defaultTab={"Drafts"} 87 + /> 88 + </div> 89 + <Media mobile> 90 + <Footer> 91 + <Actions publication={publication.uri} /> 92 + </Footer> 93 + </Media> 86 94 </div> 87 - <Media mobile> 88 - <Footer> 89 - <Actions publication={publication.uri} /> 90 - </Footer> 91 - </Media> 92 - </div> 95 + </ThemeProvider> 93 96 ); 94 97 } catch (e) { 95 98 console.log(e);
+1 -1
components/ThemeManager/ThemeProvider.tsx
··· 48 48 el?.style.setProperty(name, colorToString(value, "rgb")); 49 49 } 50 50 export function ThemeProvider(props: { 51 - entityID: string; 51 + entityID: string | null; 52 52 local?: boolean; 53 53 children: React.ReactNode; 54 54 }) {
+1 -1
components/ThemeManager/useColorAttribute.ts
··· 5 5 import { ThemeDefaults } from "./ThemeProvider"; 6 6 7 7 export function useColorAttribute( 8 - entity: string, 8 + entity: string | null, 9 9 attribute: keyof FilterAttributes<{ type: "color"; cardinality: "one" }>, 10 10 ) { 11 11 let { rootEntity } = useReplicache();