~repos /edge-city

#react#js#ssr

git clone https://pyrossh.dev/repos/edge-city.git

edge-city is a next level meta-framework for react that runs only on edge runtimes


0f7bd4aa pyrossh

2 years ago
rename Page
example/src/pages/_404/page.jsx CHANGED
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Helmet } from 'react-helmet-async';
3
3
  import "./page.css";
4
4
 
5
- const Page = () => {
5
+ export default function Page() {
6
6
  return (
7
7
  <div className="notfound-page">
8
8
  <Helmet>
@@ -14,6 +14,4 @@ const Page = () => {
14
14
  </div>
15
15
  </div>
16
16
  )
17
- }
17
+ }
18
-
19
- export default Page;
example/src/pages/_500/page.jsx CHANGED
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Helmet } from 'react-helmet-async';
3
3
  import "./page.css";
4
4
 
5
- const Page = () => {
5
+ export default function Page() {
6
6
  return (
7
7
  <div className="err-page">
8
8
  <Helmet>
@@ -14,6 +14,4 @@ const Page = () => {
14
14
  </div>
15
15
  </div>
16
16
  )
17
- }
17
+ }
18
-
19
- export default Page;
example/src/pages/about/page.jsx CHANGED
@@ -3,7 +3,7 @@ import { Link, useRouter } from "edge-city";
3
3
  import { Helmet } from 'react-helmet-async';
4
4
  import "./page.css";
5
5
 
6
- export const Page = () => {
6
+ export default function Page() {
7
7
  const router = useRouter();
8
8
  return (
9
9
  <div className="about-page">
@@ -24,5 +24,3 @@ export const Page = () => {
24
24
  </div>
25
25
  )
26
26
  }
27
-
28
- export default Page;
example/src/pages/app.jsx CHANGED
@@ -2,7 +2,7 @@ import { SSRProvider } from 'react-aria';
2
2
  import Layout from '@/components/Layout/Layout';
3
3
  import "./app.css";
4
4
 
5
- const App = ({ children }) => {
5
+ export default function App({ children }) {
6
6
  return (
7
7
  <SSRProvider>
8
8
  <Layout>
@@ -10,6 +10,4 @@ const App = ({ children }) => {
10
10
  </Layout>
11
11
  </SSRProvider>
12
12
  )
13
- }
13
+ }
14
-
15
- export default App;
example/src/pages/page.jsx CHANGED
@@ -4,7 +4,7 @@ import Counter from "@/components/Counter/Counter";
4
4
  import { Helmet } from 'react-helmet-async';
5
5
  import "./page.css";
6
6
 
7
- const Page = () => {
7
+ export default function Page() {
8
8
  const router = useRouter();
9
9
  return (
10
10
  <div>
@@ -20,6 +20,4 @@ const Page = () => {
20
20
  </div>
21
21
  </div>
22
22
  )
23
- }
23
+ };
24
-
25
- export default Page;
example/src/pages/todos/page.jsx CHANGED
@@ -7,7 +7,7 @@ import Todo from "@/components/Todo/Todo";
7
7
  import { getTodos, createTodo, updateTodo, deleteTodo } from "@/services/todos.service";
8
8
  import "./page.css";
9
9
 
10
- const Page = () => {
10
+ export default function Page() {
11
11
  const { data, refetch } = useQuery("todos", () => getTodos());
12
12
  const { mutate, isMutating, err } = useMutation(async ({ text }) => {
13
13
  await createTodo({
@@ -53,6 +53,4 @@ const Page = () => {
53
53
  </div>
54
54
  </div>
55
55
  )
56
- }
56
+ }
57
-
58
- export default Page;