generated from ocadotechnology/codeforlife-template-frontend
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Showing
8 changed files
with
1,240 additions
and
738 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Server from "codeforlife/src/server.js" | ||
|
||
new Server().run() |
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,15 +1,21 @@ | ||
import { App as _App, type AppProps as _AppProps } from "codeforlife/components" | ||
import { type FC } from "react" | ||
import { App as _ } from "codeforlife/components" | ||
|
||
import { Header } from "./components" | ||
import routes from "./routes" | ||
import store from "./app/store" | ||
import theme from "./app/theme" | ||
|
||
export interface AppProps {} | ||
export interface AppProps extends Pick<_AppProps, "path"> {} | ||
|
||
const App: FC<AppProps> = () => ( | ||
<_ store={store} theme={theme} routes={routes} header={<Header />} /> | ||
const App: FC<AppProps> = props => ( | ||
<_App | ||
store={store} | ||
theme={theme} | ||
routes={routes} | ||
header={<Header />} | ||
{...props} | ||
/> | ||
) | ||
|
||
export default App |
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,11 @@ | ||
import { StrictMode } from "react" | ||
import { hydrateRoot } from "react-dom/client" | ||
|
||
import App from "./App" | ||
|
||
hydrateRoot( | ||
document.getElementById("root") as HTMLElement, | ||
<StrictMode> | ||
<App /> | ||
</StrictMode>, | ||
) |
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,14 @@ | ||
import { StrictMode } from "react" | ||
import { renderToString } from "react-dom/server" | ||
|
||
import App from "./App" | ||
|
||
export function render(path: string) { | ||
return { | ||
html: renderToString( | ||
<StrictMode> | ||
<App path={path} /> | ||
</StrictMode>, | ||
), | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.