Skip to content

Commit

Permalink
chore(deps): update to fix dynamic params encoding (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Apr 8, 2024
1 parent 5ee8356 commit 970b2b3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"cf-release": "cd misc/cloudflare-workers && wrangler deploy"
},
"dependencies": {
"@hiogawa/react-server": "0.1.15",
"@hiogawa/react-server": "0.1.16",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-server-dom-webpack": "18.3.0-canary-14898b6a9-20240318"
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/routes/contacts/[contactId]/edit/page.tsx
Expand Up @@ -4,7 +4,7 @@ import { actionUpdateContact } from "../../../_action";
import { BackButton } from "./_client";

export default async function EditContact(props: PageProps) {
const contact = await getContact(decodeURI(props.params["contactId"]));
const contact = await getContact(props.params["contactId"]);
if (!contact) {
throw createError({ status: 404 });
}
Expand Down
3 changes: 1 addition & 2 deletions src/routes/contacts/[contactId]/page.tsx
Expand Up @@ -4,8 +4,7 @@ import { Link } from "@hiogawa/react-server/client";
import { actionDeleteContact, actoinFavorite } from "../../_action";

export default async function Contact(props: PageProps) {
// TODO: fix decoding
const contact = await getContact(decodeURI(props.params["contactId"]));
const contact = await getContact(props.params["contactId"]);
if (!contact) {
throw createError({ status: 404 });
}
Expand Down
1 change: 1 addition & 0 deletions src/routes/layout.tsx
Expand Up @@ -47,6 +47,7 @@ export default async function Layout(props: LayoutProps) {
<ul>
{contacts.map((contact) => (
<li key={contact.id}>
{/* TODO: navlink not working on initial render? */}
{/* NOTE: functional `className` prop cannot used for server/client boundary */}
<NavLink href={`/contacts/${contact.id}`}>
{contact.first || contact.last ? (
Expand Down

0 comments on commit 970b2b3

Please sign in to comment.