Skip to content

Commit

Permalink
fix(docs): update path to route in future API documentation (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
ho991217 authored Jan 23, 2025
1 parent 4a194e1 commit 7440875
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-toys-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@stackflow/docs": patch
---

Edit docs to match updated future api spec
2 changes: 1 addition & 1 deletion docs/pages/api-references/future-api/api-pipelining.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function main() {
let initialLoaderData: unknown | null = null;

for (const activity of config.activities) {
const t = makeTemplate({ path: activity.path });
const t = makeTemplate({ path: activity.route });
const match = t.parse(location.pathname + location.search);

if (!match) {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-references/future-api/api-pipelining.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function main() {
let initialLoaderData: unknown | null = null;

for (const activity of config.activities) {
const t = makeTemplate({ path: activity.path });
const t = makeTemplate({ path: activity.route });
const match = t.parse(location.pathname + location.search);

if (!match) {
Expand Down
17 changes: 14 additions & 3 deletions docs/pages/api-references/future-api/changes.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,23 @@ export const config = defineConfig({
name: "HomeActivity",

// You can declare the settings required by the History Sync Plugin in stackflow.config
path: "/",
route: "/",
},
{
name: "MyProfileActivity",
path: "/my-profile",
}
route: "/my-profile",
},
{
name: "ArticleActivity",
route: {
path: "/articles/:articleId",
decode(params) {
return {
articleId: Number(params.get("articleId")),
};
},
},
},
],
transitionDuration: 270,
});
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/api-references/future-api/loader-api.en.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export const config = defineConfig({
activities: [
{
name: "HomeActivity",
path: "/",
route: "/",
loader: homeActivityLoader,
},
{
name: "MyProfileActivity",
path: "/my-profile",
route: "/my-profile",
}
],
transitionDuration: 270,
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/api-references/future-api/loader-api.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export const config = defineConfig({
activities: [
{
name: "HomeActivity",
path: "/",
route: "/",
loader: homeActivityLoader,
},
{
name: "MyProfileActivity",
path: "/my-profile",
route: "/my-profile",
}
],
transitionDuration: 270,
Expand Down

0 comments on commit 7440875

Please sign in to comment.