Skip to content

Commit 36100fe

Browse files
committed
Move example page to .tsx
1 parent a676ede commit 36100fe

File tree

1 file changed

+21
-23
lines changed
  • website/src/app/(content-pages)/examples

1 file changed

+21
-23
lines changed
Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
---
2-
title: Examples
3-
description: Examples of Mesh usage
4-
---
1+
import { useState } from 'react';
52

6-
import { useState } from 'react'
3+
export const metadata = {
4+
title: 'Examples',
5+
description: 'Examples of Mesh usage',
6+
};
77

8-
<LiveDemo />
9-
10-
export function LiveDemo() {
11-
const [exampleRepo, setExampleRepo] = useState('json-schema-example')
8+
export default function LiveDemo() {
9+
const [exampleRepo, setExampleRepo] = useState('json-schema-example');
1210
return (
1311
<div className="min-h-[calc(100vh-var(--nextra-navbar-height))] flex flex-col">
1412
<div className="flex items-center justify-center gap-2 py-8">
1513
Choose Live Example:
1614
<select
1715
value={exampleRepo}
1816
onChange={e => {
19-
setExampleRepo(e.target.value)
17+
setExampleRepo(e.target.value);
2018
}}
2119
className="border rounded-md py-1.5"
2220
>
@@ -40,7 +38,7 @@ export function LiveDemo() {
4038
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
4139
/>
4240
</div>
43-
)
41+
);
4442
}
4543

4644
export const EXAMPLES = {
@@ -51,36 +49,36 @@ export const EXAMPLES = {
5149
Stripe: 'openapi-stripe',
5250
StackExchange: 'openapi-stackexchange',
5351
'WeatherBit on React App': 'openapi-react-weatherbit',
54-
'NextJS with Apollo': 'nextjs-apollo-example'
52+
'NextJS with Apollo': 'nextjs-apollo-example',
5553
},
5654
'JSON Schema': {
5755
'Fake API': 'json-schema-example',
5856
'Covid-19 Statistics': 'json-schema-covid',
59-
'Subscriptions, Webhooks & Live Queries': 'json-schema-subscriptions'
57+
'Subscriptions, Webhooks & Live Queries': 'json-schema-subscriptions',
6058
},
6159
OData: {
6260
TripPin: 'odata-trippin',
63-
'Microsoft Graph': 'odata-microsoft'
61+
'Microsoft Graph': 'odata-microsoft',
6462
},
6563
SOAP: {
66-
'Country Info': 'soap-country-info'
64+
'Country Info': 'soap-country-info',
6765
},
6866
MySQL: {
69-
Rfam: 'mysql-rfam'
67+
Rfam: 'mysql-rfam',
7068
},
7169
SQLite: {
72-
Chinook: 'sqlite-chinook'
70+
Chinook: 'sqlite-chinook',
7371
},
7472
'Apollo Federation': {
75-
'Apollo Federation Example': 'federation-example'
73+
'Apollo Federation Example': 'federation-example',
7674
},
7775
'Apache Thrift': {
78-
Calculator: 'thrift-calculator'
76+
Calculator: 'thrift-calculator',
7977
},
8078
gRPC: {
81-
'Movies Example': 'grpc-example'
79+
'Movies Example': 'grpc-example',
8280
},
8381
Neo4J: {
84-
'Movies Example': 'neo4j-example'
85-
}
86-
}
82+
'Movies Example': 'neo4j-example',
83+
},
84+
};

0 commit comments

Comments
 (0)