@@ -32,7 +32,6 @@ export const useNotebooks = () => {
32 const { data, isLoading: metadataLoading } = useQuery('metadata', () => api.subscribeOnce<MetaDataUpdate>('metadata-store', '/all'));
32 const { data, isLoading: metadataLoading } = useQuery('metadata', () => api.subscribeOnce<MetaDataUpdate>('metadata-store', '/all'));
33 const { groups, loading } = usePublicGroups(data || {} as MetaDataUpdate);
33 const { groups, loading } = usePublicGroups(data || {} as MetaDataUpdate);
36 const notebooks: Record<string, Association<MetadataConfig>> = _.fromPairs(!data || loading ? [] : Object.entries(data['metadata-update'].associations)
35 const notebooks: Record<string, Association<MetadataConfig>> = _.fromPairs(!data || loading ? [] : Object.entries(data['metadata-update'].associations)
37 .filter(([,v]) => v['app-name'] === 'graph'
36 .filter(([,v]) => v['app-name'] === 'graph'
38 && 'graph' in v.metadata.config
37 && 'graph' in v.metadata.config
@@ -41,8 +40,6 @@ export const useNotebooks = () => {
41 && groups.find(([, gv]) => gv.group === v.group)
40 && groups.find(([, gv]) => gv.group === v.group)
42 ).map(([,v]) => [v.resource.replace('/ship/', ''), v]));
41 ).map(([,v]) => [v.resource.replace('/ship/', ''), v]));
47 loading: metadataLoading || loading,
44 loading: metadataLoading || loading,
48 notebooks,
45 notebooks,
@@ -85,7 +82,7 @@ export const usePosts = (ship: string, name: string, type: PostType, tags: strin
88− const posts = items.filter(p => !d || d.listings.length === 0 || d.listings.find(l => l.post.link === p.post.link));
85+ const posts = items.filter(p => !d || d.listings.length === 0 || !d.listings.find(l => l.post.link === p.post.link));
91 notebook: association,
88 notebook: association,
@@ -130,7 +127,6 @@ export function getSnippet(body: Content[]): { image: string, content: string }
131 let sum = 0;
128 let sum = 0;
132 const firstContent = body.reduce((text, c) => {
129 const firstContent = body.reduce((text, c) => {
134 if ('text' in c && sum < 255) {
130 if ('text' in c && sum < 255) {
135 sum += removeMd(c.text).length;
131 sum += removeMd(c.text).length;
136 return text + c.text + ' ';
132 return text + c.text + ' ';
@@ -143,9 +139,6 @@ export function getSnippet(body: Content[]): { image: string, content: string }
143 const end = content.length > 256 ? 255 : content.length;
139 const end = content.length > 256 ? 255 : content.length;
144 const start = content.substring(0, end);
140 const start = content.substring(0, end);
146− if (firstContent.match(/jiddu/i)) {
150 content: start === firstContent ? start : `${start}...`,
143 content: start === firstContent ? start : `${start}...`,
151 image: getImage(firstContent) || image
144 image: getImage(firstContent) || image