Refactor Status component (#39731)
This commit is contained in:
10 files changed
+808
-57
No files matched your search
@@ -1,10 +1,13 @@
|
||||
import { selectExpandedStatus, selectPlainStatus } from '../selectors/statuses';
|
||||
import { useAppSelector } from '../store';
|
||||
|
||||
export function useStatus(id: string) {
|
||||
export function useStatus(id?: string | null) {
|
||||
return useAppSelector((state) => selectPlainStatus(state, id));
|
||||
}
|
||||
|
||||
export function useExpandedStatus(id: string) {
|
||||
return useAppSelector((state) => selectExpandedStatus(state, id));
|
||||
/** Adds reblog status and account information to standard Status */
|
||||
export function useExpandedStatus(id?: string | null) {
|
||||
return useAppSelector((state) =>
|
||||
selectExpandedStatus(state, id ?? undefined),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user