File size: 272 Bytes
1e92f2d
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
// @flow
import { createReadQuery, db } from 'shared/db';
import type { DBThread } from 'shared/types';

export const getThreadById = createReadQuery((id: string) => ({
  query: db.table('threads').get(id),
  tags: (thread: ?DBThread) => (thread ? [thread.id] : []),
}));