File size: 1,809 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { useTranslate } from 'i18n-calypso';
import DocumentHead from 'calypso/components/data/document-head';
import CommentSettingsComponent from 'calypso/me/notification-settings/comment-settings';
import NotificationsComponent from 'calypso/me/notification-settings/main';
import NotificationSubscriptions from 'calypso/me/notification-settings/reader-subscriptions';
import WPcomSettingsComponent from 'calypso/me/notification-settings/wpcom-settings';

export function notifications( context, next ) {
	const NotificationsTitle = () => {
		const translate = useTranslate();

		return <DocumentHead title={ translate( 'Notifications', { textOnly: true } ) } />;
	};

	context.primary = (
		<>
			<NotificationsTitle />
			<NotificationsComponent path={ context.path } />
		</>
	);
	next();
}

export function comments( context, next ) {
	const CommentsTitle = () => {
		const translate = useTranslate();

		return <DocumentHead title={ translate( 'Comments on other sites', { textOnly: true } ) } />;
	};

	context.primary = (
		<>
			<CommentsTitle />
			<CommentSettingsComponent path={ context.path } />
		</>
	);
	next();
}

export function updates( context, next ) {
	const UpdatesTitle = () => {
		const translate = useTranslate();

		return <DocumentHead title={ translate( 'Updates from WordPress.com', { textOnly: true } ) } />;
	};

	context.primary = (
		<>
			<UpdatesTitle />
			<WPcomSettingsComponent path={ context.path } />
		</>
	);
	next();
}

export function subscriptions( context, next ) {
	const SubscriptionsTitle = () => {
		const translate = useTranslate();

		return <DocumentHead title={ translate( 'Notifications', { textOnly: true } ) } />;
	};

	context.primary = (
		<>
			<SubscriptionsTitle />
			<NotificationSubscriptions path={ context.path } />
		</>
	);
	next();
}