π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
import { createContext, FC, ReactNode, useContext } from 'react';
import { Post } from '@prisma/client';
const ExistingDataContext = createContext({
integration: '',
group: undefined as undefined | string,
posts: [] as Post[],
settings: {} as any,
// the other channels the post was created with
siblings: undefined as
| undefined
| {
integration: string;
group: string;
posts: Post[];
settings: any;
}[],
});
export const ExistingDataContextProvider: FC<{
children: ReactNode;
value: any;
}> = ({ children, value }) => {
return (
<ExistingDataContext.Provider value={value}>
{children}
</ExistingDataContext.Provider>
);
};
export const useExistingData = () => useContext(ExistingDataContext);