Skip to content

Commit 809e3ff

Browse files
authored
RSC: Use pages directory (#9660)
1 parent 09d4fe0 commit 809e3ff

30 files changed

Lines changed: 184 additions & 27 deletions

File tree

__fixtures__/test-project-rsa/web/src/App.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
import { FatalErrorBoundary } from '@redwoodjs/web'
1+
import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'
2+
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'
23

34
import FatalErrorPage from './pages/FatalErrorPage/FatalErrorPage'
45
import Routes from './Routes'
56

7+
import './index.css'
8+
69
const App = () => (
710
<FatalErrorBoundary page={FatalErrorPage}>
8-
<Routes />
11+
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
12+
<RedwoodApolloProvider>
13+
<Routes />
14+
</RedwoodApolloProvider>
15+
</RedwoodProvider>
916
</FatalErrorBoundary>
1017
)
1118

__fixtures__/test-project-rsc-external-packages/web/src/AboutCounter.tsx renamed to __fixtures__/test-project-rsa/web/src/components/Counter/AboutCounter.tsx

File renamed without changes.

__fixtures__/test-project-rsc-external-packages/web/src/Counter.css renamed to __fixtures__/test-project-rsa/web/src/components/Counter/Counter.css

File renamed without changes.

__fixtures__/test-project-rsc-external-packages/web/src/Counter.module.css renamed to __fixtures__/test-project-rsa/web/src/components/Counter/Counter.module.css

File renamed without changes.

__fixtures__/test-project-rsc-external-packages/web/src/Counter.tsx renamed to __fixtures__/test-project-rsa/web/src/components/Counter/Counter.tsx

File renamed without changes.

__fixtures__/test-project-rsa/web/src/entries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export default defineEntries(
55
async (id) => {
66
switch (id) {
77
case 'AboutPage':
8-
return import('./AboutPage')
8+
return import('./pages/AboutPage/AboutPage')
99
case 'HomePage':
10-
return import('./HomePage')
10+
return import('./pages/HomePage/HomePage')
1111
default:
1212
return null
1313
}

__fixtures__/test-project-rsa/web/src/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<meta charset="UTF-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<link rel="icon" type="image/png" href="/favicon.png" />
8-
<link rel="stylesheet" href="index.css" />
98
<script type="module" src="entry.client.tsx"></script>
109
</head>
1110

__fixtures__/test-project-rsc-external-packages/web/src/AboutPage.css renamed to __fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.css

File renamed without changes.

__fixtures__/test-project-rsc-external-packages/web/src/AboutPage.tsx renamed to __fixtures__/test-project-rsa/web/src/pages/AboutPage/AboutPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Assets } from '@redwoodjs/vite/assets'
22
import { ProdRwRscServerGlobal } from '@redwoodjs/vite/rwRscGlobal'
33

4-
import { AboutCounter } from './AboutCounter'
4+
import { AboutCounter } from '../../components/Counter/AboutCounter'
55

66
import './AboutPage.css'
77

__fixtures__/test-project-rsc-external-packages/web/src/HomePage.css renamed to __fixtures__/test-project-rsa/web/src/pages/HomePage/HomePage.css

File renamed without changes.

0 commit comments

Comments
 (0)