Skip to content

Commit

Permalink
Upgrade atproto-browser to next 15 stable (#212)
Browse files Browse the repository at this point in the history
* Update next

* Async request api codemod

* Escape
  • Loading branch information
tom-sherman authored Nov 28, 2024
1 parent 4dab0a8 commit d65e2b5
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import { getHandle, getKey, getPds } from "@atproto/identity";
import { verifyRecords } from "@atproto/repo";
import { Suspense } from "react";

export default async function RkeyPage({
params,
}: {
params: {
export default async function RkeyPage(props: {
params: Promise<{
identifier: string;
collection: string;
rkey: string;
};
}>;
}) {
const params = await props.params;
const identityResult = await resolveIdentity(params.identifier);
if (!identityResult.success) {
return <div>🚨 {identityResult.error}</div>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { resolveIdentity } from "@/lib/atproto-server";
import { CollapsedDidSummary } from "@/app/at/_lib/did-components";

export default async function Layout({
children,
params,
}: {
export default async function Layout(props: {
children: React.ReactNode;
params: { identifier: string };
params: Promise<{ identifier: string }>;
}) {
const params = await props.params;

const { children } = props;

const identityResult = await resolveIdentity(params.identifier);
if (!identityResult.success) {
return <div>🚨 {identityResult.error}</div>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import Link from "@/lib/link";
import { SWRConfig } from "swr";
import { CollectionItems } from "../../_lib/collection";

export default async function CollectionPage({
params,
}: {
params: { identifier: string; collection: string };
export default async function CollectionPage(props: {
params: Promise<{ identifier: string; collection: string }>;
}) {
const params = await props.params;
const identityResult = await resolveIdentity(params.identifier);
if (!identityResult.success) {
return <div>{identityResult.error}</div>;
Expand Down
7 changes: 3 additions & 4 deletions packages/atproto-browser/app/at/[identifier]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import { getPds } from "@atproto/identity";
import { describeRepo } from "@/lib/atproto";
import { isDidWeb } from "@atproto/did";

export default async function IdentifierPage({
params,
}: {
params: { identifier: string };
export default async function IdentifierPage(props: {
params: Promise<{ identifier: string }>;
}) {
const params = await props.params;
const identityResult = await resolveIdentity(params.identifier);
if (!identityResult.success) {
return <div>{identityResult.error}</div>;
Expand Down
9 changes: 4 additions & 5 deletions packages/atproto-browser/app/blob/[identifier]/[cid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import { resolveIdentity } from "@/lib/atproto-server";
import { getPds } from "@atproto/identity";
import { CSSProperties, ReactNode } from "react";

export default async function BlobPage({
params,
}: {
params: {
export default async function BlobPage(props: {
params: Promise<{
identifier: string;
cid: string;
};
}>;
}) {
const params = await props.params;
const identityResult = await resolveIdentity(params.identifier);
if (!identityResult.success) {
return <p>{identityResult.error}</p>;
Expand Down
4 changes: 2 additions & 2 deletions packages/atproto-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@atproto/syntax": "^0.3.0",
"hls.js": "^1.5.15",
"http-link-header": "^1.1.3",
"next": "15.0.0-rc.0",
"next": "15.0.3",
"node-html-parser": "^6.1.13",
"parse-hls": "^1.0.7",
"react": "19.0.0-rc-f994737d14-20240522",
Expand All @@ -35,7 +35,7 @@
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"eslint": "^8",
"eslint-config-next": "15.0.0-rc.0",
"eslint-config-next": "15.0.3",
"tsx": "^4.16.5",
"typescript": "^5",
"vite-tsconfig-paths": "^4.3.2",
Expand Down
Loading

0 comments on commit d65e2b5

Please sign in to comment.