|
@@ -8,10 +8,10 @@ import { useSWRxInAppNotifications } from '~/stores/in-app-notification';
|
|
|
|
|
|
|
|
|
|
|
|
|
type InAppNotificationFormsProps = {
|
|
type InAppNotificationFormsProps = {
|
|
|
- onChangeUnreadNotificationsVisible: () => void
|
|
|
|
|
|
|
+ onChangeUnopendNotificationsVisible: () => void
|
|
|
}
|
|
}
|
|
|
export const InAppNotificationForms = (props: InAppNotificationFormsProps): JSX.Element => {
|
|
export const InAppNotificationForms = (props: InAppNotificationFormsProps): JSX.Element => {
|
|
|
- const { onChangeUnreadNotificationsVisible } = props;
|
|
|
|
|
|
|
+ const { onChangeUnopendNotificationsVisible } = props;
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className="my-2">
|
|
<div className="my-2">
|
|
@@ -22,7 +22,7 @@ export const InAppNotificationForms = (props: InAppNotificationFormsProps): JSX.
|
|
|
className="form-check-input"
|
|
className="form-check-input"
|
|
|
type="checkbox"
|
|
type="checkbox"
|
|
|
role="switch"
|
|
role="switch"
|
|
|
- onChange={onChangeUnreadNotificationsVisible}
|
|
|
|
|
|
|
+ onChange={onChangeUnopendNotificationsVisible}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -31,17 +31,17 @@ export const InAppNotificationForms = (props: InAppNotificationFormsProps): JSX.
|
|
|
|
|
|
|
|
|
|
|
|
|
type InAppNotificationContentProps = {
|
|
type InAppNotificationContentProps = {
|
|
|
- isUnreadNotificationsVisible: boolean
|
|
|
|
|
|
|
+ isUnopendNotificationsVisible: boolean
|
|
|
}
|
|
}
|
|
|
export const InAppNotificationContent = (props: InAppNotificationContentProps): JSX.Element => {
|
|
export const InAppNotificationContent = (props: InAppNotificationContentProps): JSX.Element => {
|
|
|
- const { isUnreadNotificationsVisible } = props;
|
|
|
|
|
|
|
+ const { isUnopendNotificationsVisible } = props;
|
|
|
const { t } = useTranslation('commons');
|
|
const { t } = useTranslation('commons');
|
|
|
|
|
|
|
|
// TODO: Infinite scroll implemented (https://redmine.weseek.co.jp/issues/138057)
|
|
// TODO: Infinite scroll implemented (https://redmine.weseek.co.jp/issues/138057)
|
|
|
const { data: inAppNotificationData } = useSWRxInAppNotifications(
|
|
const { data: inAppNotificationData } = useSWRxInAppNotifications(
|
|
|
6,
|
|
6,
|
|
|
undefined,
|
|
undefined,
|
|
|
- isUnreadNotificationsVisible ? InAppNotificationStatuses.STATUS_UNREAD : undefined,
|
|
|
|
|
|
|
+ isUnopendNotificationsVisible ? InAppNotificationStatuses.STATUS_UNOPENED : undefined,
|
|
|
{ revalidateOnFocus: true },
|
|
{ revalidateOnFocus: true },
|
|
|
);
|
|
);
|
|
|
|
|
|