Start renaming
This commit is contained in:
@@ -13,7 +13,7 @@ A handler fetches data and returns it with `page()`. The page component receives
|
||||
it in `props.data`:
|
||||
|
||||
```tsx routes/projects/[id].tsx
|
||||
import { HttpError, page } from "fresh";
|
||||
import { HttpError, page } from "sweet";
|
||||
import { define } from "@/utils.ts";
|
||||
|
||||
interface Data {
|
||||
@@ -60,7 +60,7 @@ For simpler cases, you can fetch data directly in an async component without a
|
||||
separate handler:
|
||||
|
||||
```tsx routes/projects/[id].tsx
|
||||
import { HttpError } from "fresh";
|
||||
import { HttpError } from "sweet";
|
||||
import { define } from "@/utils.ts";
|
||||
|
||||
export default define.page(async (ctx) => {
|
||||
@@ -97,7 +97,7 @@ export default define.middleware(async (ctx) => {
|
||||
```
|
||||
|
||||
```tsx routes/dashboard.tsx
|
||||
import { page } from "fresh";
|
||||
import { page } from "sweet";
|
||||
import { define } from "@/utils.ts";
|
||||
|
||||
export const handler = define.handlers({
|
||||
|
||||
Reference in New Issue
Block a user