-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41e9c6c
commit d7fe2be
Showing
16 changed files
with
129 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'houdini-react': patch | ||
--- | ||
|
||
Stabilize react deployments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'houdini-react': patch | ||
--- | ||
|
||
Fix session redirects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 39 additions & 39 deletions
78
packages/create-houdini/templates/react-typescript/src/+index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
import React from "react"; | ||
import React from 'react' | ||
|
||
export default function App({ children }) { | ||
return ( | ||
<html> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
href="https://houdinigraphql.com/images/logo.png" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css" | ||
/> | ||
<title>Houdini • React</title> | ||
</head> | ||
<body> | ||
<ErrorBoundary>{children}</ErrorBoundary> | ||
</body> | ||
</html> | ||
); | ||
return ( | ||
<html> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
href="https://houdinigraphql.com/images/logo.png" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/water.css@2/out/dark.css" | ||
/> | ||
<title>Houdini • React</title> | ||
</head> | ||
<body> | ||
<ErrorBoundary>{children}</ErrorBoundary> | ||
</body> | ||
</html> | ||
) | ||
} | ||
|
||
class ErrorBoundary extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { hasError: false }; | ||
} | ||
class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { hasError: boolean }> { | ||
constructor(props: { children: React.ReactNode }) { | ||
super(props) | ||
this.state = { hasError: false } | ||
} | ||
|
||
static getDerivedStateFromError(error) { | ||
return { hasError: true }; | ||
} | ||
static getDerivedStateFromError(error: Error) { | ||
return { hasError: true } | ||
} | ||
|
||
componentDidCatch(error, info) { | ||
console.error("ErrorBoundary caught an error:", error, info); | ||
} | ||
componentDidCatch(error: Error, info: {}) { | ||
console.error('ErrorBoundary caught an error:', error, info) | ||
} | ||
|
||
render() { | ||
if (this.state.hasError) { | ||
return <h1>Something went wrong.</h1>; | ||
} | ||
return this.props.children; | ||
} | ||
render() { | ||
if (this.state.hasError) { | ||
return <h1>Something went wrong.</h1> | ||
} | ||
return this.props.children | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,4 @@ | |
}, | ||
"main": "./build/plugin-cjs/index.js", | ||
"types": "./build/plugin/index.d.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.