mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-25 01:52:00 +03:00
Update TodoAppJs to match tutorial (#2190)
This commit is contained in:
parent
8099ef8b89
commit
b5c15d1e3a
@ -19,7 +19,7 @@ route RootRoute { path: "/", to: MainPage }
|
||||
page MainPage {
|
||||
authRequired: true,
|
||||
// We specify that the React implementation of the page is exported from
|
||||
// `src/MainPage.tsx`. This statement uses standard JS import syntax.
|
||||
// `src/MainPage.jsx`. This statement uses standard JS import syntax.
|
||||
// Use `@src` to reference files inside the `src` folder.
|
||||
component: import { MainPage } from "@src/MainPage"
|
||||
}
|
||||
|
2693
examples/tutorials/TodoApp/package-lock.json
generated
2693
examples/tutorials/TodoApp/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -12,10 +12,12 @@ export const MainPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<NewTaskForm />
|
||||
|
||||
{tasks && <TasksList tasks={tasks} />}
|
||||
|
||||
{isLoading && 'Loading...'}
|
||||
{error && 'Error: ' + error}
|
||||
|
||||
<button onClick={logout}>Logout</button>
|
||||
</div>
|
||||
)
|
||||
|
@ -5,6 +5,11 @@
|
||||
// compiler. Proper TS compiler configuration in Wasp is coming soon :)
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
// We're bundling all code in the end so this is the most appropriate option,
|
||||
// it's also important for autocomplete to work properly.
|
||||
"moduleResolution": "bundler",
|
||||
// JSX support
|
||||
"jsx": "preserve",
|
||||
"strict": true,
|
||||
@ -20,7 +25,6 @@
|
||||
// This is needed to properly support Vitest testing with jest-dom matchers.
|
||||
// Types for jest-dom are not recognized automatically and Typescript complains
|
||||
// about missing types e.g. when using `toBeInTheDocument` and other matchers.
|
||||
// todo: check if jest still works
|
||||
"node_modules/@testing-library",
|
||||
// Specifying type roots overrides the default behavior of looking at the
|
||||
// node_modules/@types folder so we had to list it explicitly.
|
||||
@ -32,6 +36,6 @@
|
||||
// compilation, the following directory doesn't exist. We need to specify
|
||||
// it to prevent this error:
|
||||
// https://stackoverflow.com/questions/42609768/typescript-error-cannot-write-file-because-it-would-overwrite-input-file
|
||||
"outDir": ".wasp/phantom",
|
||||
"outDir": ".wasp/phantom"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user