Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 60c7275

Browse files
authored
Update fixes (#463)
* upgrade rw v6 * fix svg * camelcase svg properties * lint fixes
1 parent 5948431 commit 60c7275

File tree

10 files changed

+4840
-8621
lines changed

10 files changed

+4840
-8621
lines changed

api/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "0.0.0",
44
"private": true,
55
"dependencies": {
6-
"@redwoodjs-stripe/api": "^0.1.0-rc.14",
7-
"@redwoodjs/api": "5.4.3",
8-
"@redwoodjs/auth-dbauth-api": "5.4.3",
9-
"@redwoodjs/graphql-server": "5.4.3",
6+
"@redwoodjs-stripe/api": "^1.0.7",
7+
"@redwoodjs/api": "7.1.2",
8+
"@redwoodjs/auth-dbauth-api": "7.1.2",
9+
"@redwoodjs/graphql-server": "7.1.2",
1010
"graphql-scalars": "1.22.2",
1111
"nodemailer": "6.9.3",
1212
"stripe": "12.18.0"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"devDependencies": {
1111
"@playwright/test": "1.35.1",
12-
"@redwoodjs/core": "5.4.3",
12+
"@redwoodjs/core": "7.1.2",
1313
"enquirer": "2.3.6"
1414
},
1515
"eslintConfig": {

redwood.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
[api]
1414
port = 8911
1515
[browser]
16-
open = true
16+
open = false

web/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
},
1515
"dependencies": {
1616
"@radix-ui/react-dialog": "1.0.5",
17-
"@redwoodjs-stripe/web": "^0.1.0-rc.14",
18-
"@redwoodjs/auth": "5.4.3",
19-
"@redwoodjs/auth-dbauth-web": "5.4.3",
20-
"@redwoodjs/forms": "5.4.3",
21-
"@redwoodjs/router": "5.4.3",
22-
"@redwoodjs/web": "5.4.3",
17+
"@redwoodjs-stripe/web": "^1.0.7",
18+
"@redwoodjs/auth": "7.1.2",
19+
"@redwoodjs/auth-dbauth-web": "7.1.2",
20+
"@redwoodjs/forms": "7.1.2",
21+
"@redwoodjs/router": "7.1.2",
22+
"@redwoodjs/web": "7.1.2",
2323
"@stripe/stripe-js": "1.54.2",
2424
"@xstate/immer": "0.3.3",
2525
"@xstate/react": "3.2.2",
@@ -33,6 +33,7 @@
3333
"xstate": "4.38.0"
3434
},
3535
"devDependencies": {
36+
"@redwoodjs/vite": "7.1.2",
3637
"@testing-library/user-event": "14.4.3"
3738
}
3839
}

web/src/components/Spinner/Spinner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { keyframes } from 'styled-components'
22

3-
import SpinnerSVG from './spinner.svg'
3+
import SpinnerSVG from './SpinnerSVG'
44

55
const turn = keyframes`
66
from {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const SpinnerSVG = () => {
2+
return (
3+
<svg
4+
width="38"
5+
height="38"
6+
viewBox="0 0 38 38"
7+
xmlns="http://www.w3.org/2000/svg"
8+
stroke="#000"
9+
>
10+
<g fill="none" fillRule="evenodd">
11+
<g transform="translate(1 1)" strokeWidth="2">
12+
<circle strokeOpacity=".25" cx="18" cy="18" r="18" />
13+
<path d="M36 18c0-9.94-8.06-18-18-18" />
14+
</g>
15+
</g>
16+
</svg>
17+
)
18+
}
19+
20+
export default SpinnerSVG

web/src/entry.client.jsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { hydrateRoot, createRoot } from 'react-dom/client'
2+
3+
import App from './App'
4+
/**
5+
* When `#redwood-app` isn't empty then it's very likely that you're using
6+
* prerendering. So React attaches event listeners to the existing markup
7+
* rather than replacing it.
8+
* https://reactjs.org/docs/react-dom-client.html#hydrateroot
9+
*/
10+
const redwoodAppElement = document.getElementById('redwood-app')
11+
12+
if (redwoodAppElement.children?.length > 0) {
13+
hydrateRoot(redwoodAppElement, <App />)
14+
} else {
15+
const root = createRoot(redwoodAppElement)
16+
root.render(<App />)
17+
}

web/src/pages/FatalErrorPage/FatalErrorPage.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
// You can modify this page as you wish, but it is important to keep things simple to
66
// avoid the possibility that it will cause its own error. If it does, Redwood will
77
// still render a generic error page, but your users will prefer something a bit more
8-
// thoughtful. =)
8+
// thoughtful :)
99

10-
export default () => (
11-
<main>
12-
<style
13-
dangerouslySetInnerHTML={{
14-
__html: `
10+
// This import will be automatically removed when building for production
11+
import { DevFatalErrorPage } from '@redwoodjs/web/dist/components/DevFatalErrorPage'
12+
13+
export default DevFatalErrorPage ||
14+
(() => (
15+
<main>
16+
<style
17+
dangerouslySetInnerHTML={{
18+
__html: `
1519
html, body {
1620
margin: 0;
1721
}
@@ -42,13 +46,12 @@ export default () => (
4246
color: #2D3748;
4347
}
4448
`,
45-
}}
46-
/>
47-
48-
<section>
49-
<h1>
50-
<span>Something went wrong</span>
51-
</h1>
52-
</section>
53-
</main>
54-
)
49+
}}
50+
/>
51+
<section>
52+
<h1>
53+
<span>Something went wrong</span>
54+
</h1>
55+
</section>
56+
</main>
57+
))

web/vite.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import dns from 'dns'
2+
3+
import { defineConfig } from 'vite'
4+
5+
import redwood from '@redwoodjs/vite'
6+
7+
// See: https://vitejs.dev/config/server-options.html#server-host
8+
// So that Vite will load on local instead of 127.0.0.1
9+
dns.setDefaultResultOrder('verbatim')
10+
11+
/**
12+
* https://vitejs.dev/config/
13+
* @type {import('vite').UserConfig}
14+
*/
15+
const viteConfig = {
16+
plugins: [redwood()],
17+
}
18+
19+
export default defineConfig(viteConfig)

0 commit comments

Comments
 (0)