Skip to content

Commit

Permalink
refactor: /item to /items (denoland#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Aug 14, 2023
1 parent 6f5fbcb commit ee027aa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/ItemSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function ItemSummary(props: ItemSummaryProps) {
<p>
<a
class="visited:(text-[purple] dark:text-[lightpink]) hover:underline mr-4"
href={`/item/${props.item.id}`}
href={`/items/${props.item.id}`}
>
{props.item.title}
</a>
Expand Down
4 changes: 2 additions & 2 deletions fresh.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as $15 from "./routes/dashboard/stats.tsx";
import * as $16 from "./routes/dashboard/users.tsx";
import * as $17 from "./routes/feed.ts";
import * as $18 from "./routes/index.tsx";
import * as $19 from "./routes/item/[id].tsx";
import * as $19 from "./routes/items/[id].tsx";
import * as $20 from "./routes/notifications/[id].ts";
import * as $21 from "./routes/notifications/_middleware.ts";
import * as $22 from "./routes/notifications/index.tsx";
Expand Down Expand Up @@ -55,7 +55,7 @@ const manifest = {
"./routes/dashboard/users.tsx": $16,
"./routes/feed.ts": $17,
"./routes/index.tsx": $18,
"./routes/item/[id].tsx": $19,
"./routes/items/[id].tsx": $19,
"./routes/notifications/[id].ts": $20,
"./routes/notifications/_middleware.ts": $21,
"./routes/notifications/index.tsx": $22,
Expand Down
2 changes: 1 addition & 1 deletion routes/api/vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function sharedHandler(
userLogin: item.userLogin,
type: "vote",
text: `${user.login} upvoted your post: ${item.title}`,
originUrl: `/item/${itemId}`,
originUrl: `/items/${itemId}`,
...newNotificationProps(),
};
await createNotification(notification);
Expand Down
4 changes: 2 additions & 2 deletions routes/item/[id].tsx → routes/items/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ export const handler: Handlers<ItemPageData, State> = {
userLogin: item.userLogin,
type: "comment",
text: `${user.login} commented on your post: ${item.title}`,
originUrl: `/item/${itemId}`,
originUrl: `/items/${itemId}`,
...newNotificationProps(),
};
await createNotification(notification);
}

return redirect(`/item/${itemId}`);
return redirect(`/items/${itemId}`);
},
};

Expand Down
2 changes: 1 addition & 1 deletion routes/submit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const handler: Handlers<State, State> = {
};
await createItem(item);

return redirect(`/item/${item!.id}`);
return redirect(`/items/${item!.id}`);
},
};

Expand Down

0 comments on commit ee027aa

Please sign in to comment.