PluginProbe
Extendify / 0.10.2
Extendify v0.10.2
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / Assist / AssistLandingPage.js

AssistLandingPage.js in Extendify 0.10.2, at src/Assist/AssistLandingPage.js

42 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __, sprintf } from '@wordpress/i18n'
2 import { SWRConfig } from 'swr'
3 import { PagesList } from '@assist/components/PagesList'
4 import { TasksList } from '@assist/components/TasksList'
5
6 const Page = () => (
7 <div>
8 <div className="pt-12 flex justify-center flex-col">
9 <h2 className="text-center text-3xl">
10 {sprintf(__('Welcome to %s', 'extendify'), 'Assist')}
11 </h2>
12 <p className="text-center text-xl">
13 {__(
14 'Manage your site content from a centralized location.',
15 'extendify',
16 )}
17 </p>
18 <TasksList />
19 <PagesList />
20 </div>
21 </div>
22 )
23
24 export const AssistLandingPage = () => (
25 <SWRConfig
26 value={{
27 onErrorRetry: (error, key, config, revalidate, { retryCount }) => {
28 if (error.status === 404) return
29 if (error?.data?.status === 403) {
30 // if they are logged out, we can't recover
31 window.location.reload()
32 return
33 }
34
35 // Retry after 5 seconds.
36 setTimeout(() => revalidate({ retryCount }), 5000)
37 },
38 }}>
39 <Page />
40 </SWRConfig>
41 )
42