@lobehub/chat 1.141.4 → 1.141.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.github/workflows/test.yml +6 -8
  2. package/CHANGELOG.md +42 -0
  3. package/apps/desktop/src/main/controllers/BrowserWindowsCtr.ts +41 -10
  4. package/apps/desktop/src/main/controllers/__tests__/BrowserWindowsCtr.test.ts +14 -7
  5. package/apps/desktop/src/main/core/browser/BrowserManager.ts +56 -18
  6. package/changelog/v1.json +14 -0
  7. package/package.json +3 -1
  8. package/packages/electron-client-ipc/src/events/index.ts +2 -0
  9. package/packages/electron-client-ipc/src/events/windows.ts +32 -19
  10. package/packages/utils/src/server/responsive.ts +1 -1
  11. package/playwright.config.ts +1 -1
  12. package/src/app/(backend)/trpc/desktop/[trpc]/route.ts +5 -0
  13. package/src/app/[variants]/(main)/discover/(detail)/_layout/DetailLayout.tsx +22 -0
  14. package/src/app/[variants]/(main)/discover/(detail)/_layout/Mobile/Header.tsx +6 -7
  15. package/src/app/[variants]/(main)/discover/(detail)/assistant/AssistantDetailPage.tsx +47 -0
  16. package/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Header.tsx +10 -9
  17. package/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/features/Sidebar/Related/index.tsx +3 -3
  18. package/src/app/[variants]/(main)/discover/(detail)/components/NotFound.tsx +23 -0
  19. package/src/app/[variants]/(main)/discover/(detail)/features/Back.tsx +2 -2
  20. package/src/app/[variants]/(main)/discover/(detail)/features/Breadcrumb.tsx +3 -4
  21. package/src/app/[variants]/(main)/discover/(detail)/mcp/McpDetailPage.tsx +51 -0
  22. package/src/app/[variants]/(main)/discover/(detail)/mcp/[slug]/features/Sidebar/Related/index.tsx +3 -3
  23. package/src/app/[variants]/(main)/discover/(detail)/model/ModelDetailPage.tsx +44 -0
  24. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Sidebar/Related/index.tsx +3 -3
  25. package/src/app/[variants]/(main)/discover/(detail)/provider/ProviderDetailPage.tsx +44 -0
  26. package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/features/Sidebar/ActionButton/ProviderConfig.tsx +16 -2
  27. package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/features/Sidebar/Related/index.tsx +3 -3
  28. package/src/app/[variants]/(main)/discover/(list)/(home)/HomePage.tsx +45 -0
  29. package/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsx +7 -8
  30. package/src/app/[variants]/(main)/discover/(list)/_layout/ListLayout.tsx +22 -0
  31. package/src/app/[variants]/(main)/discover/(list)/_layout/Mobile/Nav.tsx +4 -5
  32. package/src/app/[variants]/(main)/discover/(list)/assistant/AssistantLayout.tsx +21 -0
  33. package/src/app/[variants]/(main)/discover/(list)/assistant/AssistantPage.tsx +44 -0
  34. package/src/app/[variants]/(main)/discover/(list)/assistant/features/Category/index.tsx +5 -6
  35. package/src/app/[variants]/(main)/discover/(list)/assistant/features/List/Item.tsx +8 -8
  36. package/src/app/[variants]/(main)/discover/(list)/features/Pagination.tsx +7 -8
  37. package/src/app/[variants]/(main)/discover/(list)/mcp/McpLayout.tsx +21 -0
  38. package/src/app/[variants]/(main)/discover/(list)/mcp/McpPage.tsx +44 -0
  39. package/src/app/[variants]/(main)/discover/(list)/mcp/features/Category/index.tsx +5 -6
  40. package/src/app/[variants]/(main)/discover/(list)/mcp/features/List/Item.tsx +12 -8
  41. package/src/app/[variants]/(main)/discover/(list)/model/ModelLayout.tsx +21 -0
  42. package/src/app/[variants]/(main)/discover/(list)/model/ModelPage.tsx +44 -0
  43. package/src/app/[variants]/(main)/discover/(list)/model/_layout/Desktop.tsx +1 -1
  44. package/src/app/[variants]/(main)/discover/(list)/model/features/Category/index.tsx +5 -6
  45. package/src/app/[variants]/(main)/discover/(list)/model/features/List/Item.tsx +5 -6
  46. package/src/app/[variants]/(main)/discover/(list)/provider/ProviderPage.tsx +43 -0
  47. package/src/app/[variants]/(main)/discover/(list)/provider/features/List/Item.tsx +16 -11
  48. package/src/app/[variants]/(main)/discover/DiscoverRouter.tsx +167 -0
  49. package/src/app/[variants]/(main)/discover/[[...path]]/page.tsx +11 -0
  50. package/src/app/[variants]/(main)/discover/_layout/Desktop/Header.tsx +2 -2
  51. package/src/app/[variants]/(main)/discover/_layout/DiscoverLayout.tsx +22 -0
  52. package/src/app/[variants]/(main)/discover/components/Title.tsx +5 -2
  53. package/src/app/[variants]/(main)/discover/features/Title.tsx +35 -12
  54. package/src/app/[variants]/(main)/discover/features/useNav.tsx +11 -12
  55. package/src/app/[variants]/(main)/labs/components/LabCard.tsx +6 -7
  56. package/src/layout/GlobalProvider/Query.tsx +5 -1
  57. package/vercel.json +1 -1
  58. package/src/app/[variants]/(main)/discover/(detail)/assistant/[...slugs]/page.tsx +0 -110
  59. package/src/app/[variants]/(main)/discover/(detail)/layout.tsx +0 -12
  60. package/src/app/[variants]/(main)/discover/(detail)/mcp/[slug]/page.tsx +0 -103
  61. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/page.tsx +0 -104
  62. package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/page.tsx +0 -103
  63. package/src/app/[variants]/(main)/discover/(list)/(home)/page.tsx +0 -44
  64. package/src/app/[variants]/(main)/discover/(list)/assistant/layout.tsx +0 -12
  65. package/src/app/[variants]/(main)/discover/(list)/assistant/page.tsx +0 -46
  66. package/src/app/[variants]/(main)/discover/(list)/layout.tsx +0 -12
  67. package/src/app/[variants]/(main)/discover/(list)/mcp/layout.tsx +0 -12
  68. package/src/app/[variants]/(main)/discover/(list)/mcp/page.tsx +0 -46
  69. package/src/app/[variants]/(main)/discover/(list)/model/layout.tsx +0 -12
  70. package/src/app/[variants]/(main)/discover/(list)/model/page.tsx +0 -44
  71. package/src/app/[variants]/(main)/discover/(list)/provider/page.tsx +0 -44
  72. package/src/app/[variants]/(main)/discover/layout.tsx +0 -12
@@ -1,103 +0,0 @@
1
- import { notFound } from 'next/navigation';
2
- import urlJoin from 'url-join';
3
-
4
- import StructuredData from '@/components/StructuredData';
5
- import { isDesktop } from '@/const/version';
6
- import { ldModule } from '@/server/ld';
7
- import { metadataModule } from '@/server/metadata';
8
- import { DiscoverService } from '@/server/services/discover';
9
- import { translation } from '@/server/translation';
10
- import { PageProps } from '@/types/next';
11
- import { RouteVariants } from '@/utils/server/routeVariants';
12
-
13
- import Client from './Client';
14
-
15
- type DiscoverPageProps = PageProps<{ slug: string; variants: string }>;
16
-
17
- const getSharedProps = async (props: DiscoverPageProps) => {
18
- const params = await props.params;
19
- const { slug: identifier } = params;
20
- const { isMobile, locale: hl } = await RouteVariants.getVariantsFromProps(props);
21
- const discoverService = new DiscoverService();
22
- const [{ t, locale }, data] = await Promise.all([
23
- translation('metadata', hl),
24
- discoverService.getMcpDetail({ identifier, locale: hl }),
25
- ]);
26
- return {
27
- data,
28
- identifier,
29
- isMobile,
30
- locale,
31
- t,
32
- };
33
- };
34
-
35
- export const generateMetadata = async (props: DiscoverPageProps) => {
36
- const { data, t, locale, identifier } = await getSharedProps(props);
37
- if (!data) return notFound();
38
-
39
- const { tags, createdAt, homepage, author, description, name } = data;
40
-
41
- return {
42
- authors: [
43
- { name: author, url: homepage },
44
- { name: 'LobeHub', url: 'https://github.com/lobehub' },
45
- { name: 'LobeHub Cloud', url: 'https://lobehub,com' },
46
- ],
47
- keywords: tags,
48
- ...metadataModule.generate({
49
- alternate: true,
50
- canonical: urlJoin('https://lobehub.com/mcp', identifier),
51
- description: description,
52
- locale,
53
- tags: tags,
54
- title: [name, t('discover.mcp.title')].join(' · '),
55
- url: urlJoin('/discover/mcp', identifier),
56
- }),
57
- other: {
58
- 'article:author': author,
59
- 'article:published_time': createdAt
60
- ? new Date(createdAt).toISOString()
61
- : new Date().toISOString(),
62
- 'robots': 'index,follow,max-image-preview:large',
63
- },
64
- };
65
- };
66
-
67
- export const generateStaticParams = async () => [];
68
-
69
- const Page = async (props: DiscoverPageProps) => {
70
- const { data, identifier, isMobile, locale, t } = await getSharedProps(props);
71
- if (!data) return notFound();
72
-
73
- const { tags, name, description, createdAt, author } = data;
74
-
75
- const ld = ldModule.generate({
76
- article: {
77
- author: [author?.name || 'LobeHub'],
78
- enable: true,
79
- identifier,
80
- tags: tags,
81
- },
82
- date: createdAt ? new Date(createdAt).toISOString() : new Date().toISOString(),
83
- description: description || t('discover.mcp.description'),
84
- locale,
85
- title: [name, t('discover.mcp.title')].join(' · '),
86
- url: urlJoin('/discover/mcp', identifier),
87
- webpage: {
88
- enable: true,
89
- search: '/discover/mcp',
90
- },
91
- });
92
-
93
- return (
94
- <>
95
- {!isDesktop && <StructuredData ld={ld} />}
96
- <Client identifier={identifier} mobile={isMobile} />
97
- </>
98
- );
99
- };
100
-
101
- Page.displayName = 'DiscoverMCPDetail';
102
-
103
- export default Page;
@@ -1,104 +0,0 @@
1
- import { notFound } from 'next/navigation';
2
- import urlJoin from 'url-join';
3
-
4
- import StructuredData from '@/components/StructuredData';
5
- import { ldModule } from '@/server/ld';
6
- import { metadataModule } from '@/server/metadata';
7
- import { DiscoverService } from '@/server/services/discover';
8
- import { translation } from '@/server/translation';
9
- import { PageProps } from '@/types/next';
10
- import { RouteVariants } from '@/utils/server/routeVariants';
11
-
12
- import Client from './Client';
13
-
14
- type DiscoverPageProps = PageProps<{ slugs: string[]; variants: string }>;
15
-
16
- const getSharedProps = async (props: DiscoverPageProps) => {
17
- const params = await props.params;
18
- const { isMobile, locale: hl } = await RouteVariants.getVariantsFromProps(props);
19
-
20
- const { slugs } = params;
21
- const identifier = decodeURIComponent(slugs.join('/'));
22
- const { t, locale } = await translation('metadata', hl);
23
- const { t: td } = await translation('models', hl);
24
-
25
- const discoverService = new DiscoverService();
26
- const data = await discoverService.getModelDetail({ identifier });
27
- return {
28
- data,
29
- discoverService,
30
- identifier,
31
- isMobile,
32
- locale,
33
- t,
34
- td,
35
- };
36
- };
37
-
38
- export const generateMetadata = async (props: DiscoverPageProps) => {
39
- const { data, locale, identifier, t, td } = await getSharedProps(props);
40
- if (!data) return;
41
-
42
- const { displayName, releasedAt, providers } = data;
43
-
44
- return {
45
- authors: [
46
- { name: displayName || identifier },
47
- { name: 'LobeHub', url: 'https://github.com/lobehub' },
48
- { name: 'LobeChat', url: 'https://github.com/lobehub/lobe-chat' },
49
- ],
50
- webpage: {
51
- enable: true,
52
- search: true,
53
- },
54
- ...metadataModule.generate({
55
- alternate: true,
56
- description: td(`${identifier}.description`) || t('discover.models.description'),
57
- locale,
58
- tags: providers.map((item) => item.name) || [],
59
- title: [displayName || identifier, t('discover.models.title')].join(' · '),
60
- url: urlJoin('/discover/model', identifier),
61
- }),
62
- other: {
63
- 'article:author': displayName || identifier,
64
- 'article:published_time': releasedAt
65
- ? new Date(releasedAt).toISOString()
66
- : new Date().toISOString(),
67
- 'robots': 'index,follow,max-image-preview:large',
68
- },
69
- };
70
- };
71
-
72
- export const generateStaticParams = async () => [];
73
-
74
- const Page = async (props: DiscoverPageProps) => {
75
- const { data, locale, identifier, t, td, isMobile } = await getSharedProps(props);
76
- if (!data) return notFound();
77
-
78
- const { displayName, releasedAt, providers } = data;
79
-
80
- const ld = ldModule.generate({
81
- article: {
82
- author: [displayName || identifier],
83
- enable: true,
84
- identifier,
85
- tags: providers.map((item) => item.name) || [],
86
- },
87
- date: releasedAt ? new Date(releasedAt).toISOString() : new Date().toISOString(),
88
- description: td(`${identifier}.description`) || t('discover.models.description'),
89
- locale,
90
- title: [displayName || identifier, t('discover.models.title')].join(' · '),
91
- url: urlJoin('/discover/model', identifier),
92
- });
93
-
94
- return (
95
- <>
96
- <StructuredData ld={ld} />
97
- <Client identifier={identifier} mobile={isMobile} />
98
- </>
99
- );
100
- };
101
-
102
- Page.DisplayName = 'DiscoverModelDetail';
103
-
104
- export default Page;
@@ -1,103 +0,0 @@
1
- import { notFound } from 'next/navigation';
2
- import urlJoin from 'url-join';
3
-
4
- import StructuredData from '@/components/StructuredData';
5
- import { ldModule } from '@/server/ld';
6
- import { metadataModule } from '@/server/metadata';
7
- import { DiscoverService } from '@/server/services/discover';
8
- import { translation } from '@/server/translation';
9
- import { PageProps } from '@/types/next';
10
- import { RouteVariants } from '@/utils/server/routeVariants';
11
-
12
- import Client from './Client';
13
-
14
- type DiscoverPageProps = PageProps<{ slugs: string[]; variants: string }, { version?: string }>;
15
-
16
- const getSharedProps = async (props: DiscoverPageProps) => {
17
- const [params, { isMobile, locale: hl }] = await Promise.all([
18
- props.params,
19
- RouteVariants.getVariantsFromProps(props),
20
- ]);
21
- const { slugs } = params;
22
- const identifier = decodeURIComponent(slugs.join('/'));
23
- const discoverService = new DiscoverService();
24
- const [{ t, locale }, { t: td }, data] = await Promise.all([
25
- translation('metadata', hl),
26
- translation('providers', hl),
27
- discoverService.getProviderDetail({ identifier }),
28
- ]);
29
- return {
30
- data,
31
- identifier,
32
- isMobile,
33
- locale,
34
- t,
35
- td,
36
- };
37
- };
38
-
39
- export const generateMetadata = async (props: DiscoverPageProps) => {
40
- const { data, t, td, locale, identifier } = await getSharedProps(props);
41
- if (!data) return;
42
-
43
- const { name, models = [] } = data;
44
-
45
- return {
46
- authors: [
47
- { name: name },
48
- { name: 'LobeHub', url: 'https://github.com/lobehub' },
49
- { name: 'LobeChat', url: 'https://github.com/lobehub/lobe-chat' },
50
- ],
51
- ...metadataModule.generate({
52
- alternate: true,
53
- description: td(`${identifier}.description`) || t('discover.providers.description'),
54
- locale,
55
- tags: models.map((item) => item.displayName || item.id) || [],
56
- title: [name, t('discover.providers.title')].join(' · '),
57
- url: urlJoin('/discover/provider', identifier),
58
- }),
59
- other: {
60
- 'article:author': name,
61
- 'article:published_time': new Date().toISOString(),
62
- 'robots': 'index,follow,max-image-preview:large',
63
- },
64
- };
65
- };
66
-
67
- export const generateStaticParams = async () => [];
68
-
69
- const Page = async (props: DiscoverPageProps) => {
70
- const { data, t, td, locale, identifier, isMobile } = await getSharedProps(props);
71
- if (!data) return notFound();
72
-
73
- const { models, name } = data;
74
-
75
- const ld = ldModule.generate({
76
- article: {
77
- author: [name],
78
- enable: true,
79
- identifier,
80
- tags: models.map((item) => item.displayName || item.id) || [],
81
- },
82
- date: new Date().toISOString(),
83
- description: td(`${identifier}.description`) || t('discover.providers.description'),
84
- locale,
85
- title: [name, t('discover.providers.title')].join(' · '),
86
- url: urlJoin('/discover/provider', identifier),
87
- webpage: {
88
- enable: true,
89
- search: true,
90
- },
91
- });
92
-
93
- return (
94
- <>
95
- <StructuredData ld={ld} />
96
- <Client identifier={identifier} mobile={isMobile} />
97
- </>
98
- );
99
- };
100
-
101
- Page.DisplayName = 'DiscoverProviderDetail';
102
-
103
- export default Page;
@@ -1,44 +0,0 @@
1
- import StructuredData from '@/components/StructuredData';
2
- import { ldModule } from '@/server/ld';
3
- import { metadataModule } from '@/server/metadata';
4
- import { DynamicLayoutProps } from '@/types/next';
5
- import { parsePageMetaProps } from '@/utils/server/pageProps';
6
-
7
- import Client from './Client';
8
-
9
- export const generateMetadata = async (props: DynamicLayoutProps) => {
10
- const { locale, t } = await parsePageMetaProps(props);
11
- return metadataModule.generate({
12
- alternate: true,
13
- description: t('discover.description'),
14
- locale,
15
- title: t('discover.title'),
16
- url: '/discover',
17
- });
18
- };
19
-
20
- const Page = async (props: DynamicLayoutProps) => {
21
- const { locale, t, isMobile } = await parsePageMetaProps(props);
22
-
23
- const ld = ldModule.generate({
24
- description: t('discover.description'),
25
- locale,
26
- title: t('discover.title'),
27
- url: '/discover',
28
- webpage: {
29
- enable: true,
30
- search: true,
31
- },
32
- });
33
-
34
- return (
35
- <>
36
- <StructuredData ld={ld} />
37
- <Client mobile={isMobile} />
38
- </>
39
- );
40
- };
41
-
42
- Page.DisplayName = 'DiscoverHome';
43
-
44
- export default Page;
@@ -1,12 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- import ServerLayout from '@/components/server/ServerLayout';
4
-
5
- import Desktop from './_layout/Desktop';
6
- import Mobile from './_layout/Mobile';
7
-
8
- const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
9
-
10
- MainLayout.displayName = 'DiscoverAssistantsLayout';
11
-
12
- export default MainLayout;
@@ -1,46 +0,0 @@
1
- import StructuredData from '@/components/StructuredData';
2
- import { ldModule } from '@/server/ld';
3
- import { metadataModule } from '@/server/metadata';
4
- import { DynamicLayoutProps } from '@/types/next';
5
- import { parsePageMetaProps } from '@/utils/server/pageProps';
6
-
7
- import Client from './Client';
8
-
9
- export const generateMetadata = async (props: DynamicLayoutProps) => {
10
- const { locale, t } = await parsePageMetaProps(props);
11
-
12
- return metadataModule.generate({
13
- alternate: true,
14
- canonical: 'https://lobehub.com/agent',
15
- description: t('discover.assistants.description'),
16
- locale,
17
- title: t('discover.assistants.title'),
18
- url: '/discover/assistant',
19
- });
20
- };
21
-
22
- const Page = async (props: DynamicLayoutProps) => {
23
- const { locale, t, isMobile } = await parsePageMetaProps(props);
24
-
25
- const ld = ldModule.generate({
26
- description: t('discover.assistants.description'),
27
- locale,
28
- title: t('discover.assistants.title'),
29
- url: '/discover/assistant',
30
- webpage: {
31
- enable: true,
32
- search: '/discover/assistant',
33
- },
34
- });
35
-
36
- return (
37
- <>
38
- <StructuredData ld={ld} />
39
- <Client mobile={isMobile} />
40
- </>
41
- );
42
- };
43
-
44
- Page.DisplayName = 'DiscoverAssistants';
45
-
46
- export default Page;
@@ -1,12 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- import ServerLayout from '@/components/server/ServerLayout';
4
-
5
- import Desktop from './_layout/Desktop';
6
- import Mobile from './_layout/Mobile';
7
-
8
- const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
9
-
10
- MainLayout.displayName = 'DiscoverLayout';
11
-
12
- export default MainLayout;
@@ -1,12 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- import ServerLayout from '@/components/server/ServerLayout';
4
-
5
- import Desktop from './_layout/Desktop';
6
- import Mobile from './_layout/Mobile';
7
-
8
- const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
9
-
10
- MainLayout.displayName = 'DiscoverToolsLayout';
11
-
12
- export default MainLayout;
@@ -1,46 +0,0 @@
1
- import StructuredData from '@/components/StructuredData';
2
- import { ldModule } from '@/server/ld';
3
- import { metadataModule } from '@/server/metadata';
4
- import { DynamicLayoutProps } from '@/types/next';
5
- import { parsePageMetaProps } from '@/utils/server/pageProps';
6
-
7
- import Client from './Client';
8
-
9
- export const generateMetadata = async (props: DynamicLayoutProps) => {
10
- const { locale, t } = await parsePageMetaProps(props);
11
-
12
- return metadataModule.generate({
13
- alternate: true,
14
- canonical: 'https://lobehub.com/mcp',
15
- description: t('discover.plugins.description'),
16
- locale,
17
- title: t('discover.plugins.title'),
18
- url: '/discover/mcp',
19
- });
20
- };
21
-
22
- const Page = async (props: DynamicLayoutProps) => {
23
- const { locale, t, isMobile } = await parsePageMetaProps(props);
24
-
25
- const ld = ldModule.generate({
26
- description: t('discover.plugins.description'),
27
- locale,
28
- title: t('discover.plugins.title'),
29
- url: '/discover/mcp',
30
- webpage: {
31
- enable: true,
32
- search: '/discover/mcp',
33
- },
34
- });
35
-
36
- return (
37
- <>
38
- <StructuredData ld={ld} />
39
- <Client mobile={isMobile} />
40
- </>
41
- );
42
- };
43
-
44
- Page.DisplayName = 'DiscoverMCP';
45
-
46
- export default Page;
@@ -1,12 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- import ServerLayout from '@/components/server/ServerLayout';
4
-
5
- import Desktop from './_layout/Desktop';
6
- import Mobile from './_layout/Mobile';
7
-
8
- const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
9
-
10
- MainLayout.displayName = 'DiscoverModelsLayout';
11
-
12
- export default MainLayout;
@@ -1,44 +0,0 @@
1
- import StructuredData from '@/components/StructuredData';
2
- import { ldModule } from '@/server/ld';
3
- import { metadataModule } from '@/server/metadata';
4
- import { DynamicLayoutProps } from '@/types/next';
5
- import { parsePageMetaProps } from '@/utils/server/pageProps';
6
-
7
- import Client from './Client';
8
-
9
- export const generateMetadata = async (props: DynamicLayoutProps) => {
10
- const { locale, t } = await parsePageMetaProps(props);
11
- return metadataModule.generate({
12
- alternate: true,
13
- description: t('discover.models.description'),
14
- locale,
15
- title: t('discover.models.title'),
16
- url: '/discover/model',
17
- });
18
- };
19
-
20
- const Page = async (props: DynamicLayoutProps) => {
21
- const { locale, t } = await parsePageMetaProps(props);
22
-
23
- const ld = ldModule.generate({
24
- description: t('discover.models.description'),
25
- locale,
26
- title: t('discover.models.title'),
27
- url: '/discover/model',
28
- webpage: {
29
- enable: true,
30
- search: '/discover/model',
31
- },
32
- });
33
-
34
- return (
35
- <>
36
- <StructuredData ld={ld} />
37
- <Client />
38
- </>
39
- );
40
- };
41
-
42
- Page.DisplayName = 'DiscoverModels';
43
-
44
- export default Page;
@@ -1,44 +0,0 @@
1
- import StructuredData from '@/components/StructuredData';
2
- import { ldModule } from '@/server/ld';
3
- import { metadataModule } from '@/server/metadata';
4
- import { DynamicLayoutProps } from '@/types/next';
5
- import { parsePageMetaProps } from '@/utils/server/pageProps';
6
-
7
- import Client from './Client';
8
-
9
- export const generateMetadata = async (props: DynamicLayoutProps) => {
10
- const { locale, t } = await parsePageMetaProps(props);
11
- return metadataModule.generate({
12
- alternate: true,
13
- description: t('discover.providers.description'),
14
- locale,
15
- title: t('discover.providers.title'),
16
- url: '/discover/provider',
17
- });
18
- };
19
-
20
- const Page = async (props: DynamicLayoutProps) => {
21
- const { locale, t, isMobile } = await parsePageMetaProps(props);
22
-
23
- const ld = ldModule.generate({
24
- description: t('discover.providers.description'),
25
- locale,
26
- title: t('discover.providers.title'),
27
- url: '/discover/provider',
28
- webpage: {
29
- enable: true,
30
- search: '/discover/provider',
31
- },
32
- });
33
-
34
- return (
35
- <>
36
- <StructuredData ld={ld} />
37
- <Client mobile={isMobile} />
38
- </>
39
- );
40
- };
41
-
42
- Page.DisplayName = 'DiscoverProviders';
43
-
44
- export default Page;
@@ -1,12 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
-
3
- import ServerLayout from '@/components/server/ServerLayout';
4
-
5
- import Desktop from './_layout/Desktop';
6
- import Mobile from './_layout/Mobile';
7
-
8
- const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
9
-
10
- MainLayout.displayName = 'DiscoverStoreLayout';
11
-
12
- export default MainLayout;