2024-03-13 13:44:13 -07:00
|
|
|
// Copyright 2024 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { createSelector } from 'reselect';
|
2025-09-16 17:39:03 -07:00
|
|
|
import type { StateType } from '../reducer.js';
|
|
|
|
import type { ToastStateType } from '../ducks/toast.js';
|
2024-03-13 13:44:13 -07:00
|
|
|
|
|
|
|
export function getToastState(state: StateType): ToastStateType {
|
|
|
|
return state.toast;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getToast = createSelector(getToastState, ({ toast }) => toast);
|