🚨make biome happy with new stuff
This commit is contained in:
parent
5b5e21e614
commit
eb97ade514
4 changed files with 18 additions and 12 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
|
@ -5,5 +5,8 @@
|
||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
"source.organizeImports": "explicit"
|
"source.organizeImports": "explicit"
|
||||||
},
|
},
|
||||||
"typescript.tsdk": "node_modules\\typescript\\lib"
|
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "biomejs.biome"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { AppBskyActorDefs } from "@atproto/api";
|
import type { AppBskyActorDefs } from "@atproto/api";
|
||||||
|
|
||||||
import { OEmbedTypes } from "../routes/getOEmbed.ts";
|
import { OEmbedTypes } from "../routes/getOEmbed.ts";
|
||||||
import { Layout } from "./Layout.tsx";
|
import { Layout } from "./Layout.tsx";
|
||||||
|
|
@ -12,7 +12,10 @@ interface ProfileProps {
|
||||||
export const Profile = ({ profile, url, appDomain }: ProfileProps) => (
|
export const Profile = ({ profile, url, appDomain }: ProfileProps) => (
|
||||||
<Layout url={url}>
|
<Layout url={url}>
|
||||||
<meta name="twitter:creator" content={`@${profile.handle}`} />
|
<meta name="twitter:creator" content={`@${profile.handle}`} />
|
||||||
<meta property="og:description" content={profile.description ?? ""} />
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content={profile.description ?? ""}
|
||||||
|
/>
|
||||||
<meta
|
<meta
|
||||||
property="og:title"
|
property="og:title"
|
||||||
content={`${profile.displayName} (@${profile.handle})`}
|
content={`${profile.displayName} (@${profile.handle})`}
|
||||||
|
|
@ -21,11 +24,11 @@ export const Profile = ({ profile, url, appDomain }: ProfileProps) => (
|
||||||
|
|
||||||
<link
|
<link
|
||||||
type="application/json+oembed"
|
type="application/json+oembed"
|
||||||
href={`https://${appDomain}/oembed?type=${OEmbedTypes.Profile}&follows=${
|
href={`https://${appDomain}/oembed?type=${
|
||||||
profile.followsCount
|
OEmbedTypes.Profile
|
||||||
}&posts=${profile.postsCount}&avatar=${encodeURIComponent(
|
}&follows=${profile.followsCount}&posts=${
|
||||||
profile.avatar ?? ""
|
profile.postsCount
|
||||||
)}`}
|
}&avatar=${encodeURIComponent(profile.avatar ?? "")}`}
|
||||||
/>
|
/>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { BskyAgent } from "@atproto/api";
|
import type { BskyAgent } from "@atproto/api";
|
||||||
|
|
||||||
export interface fetchProfileOptions {
|
export interface fetchProfileOptions {
|
||||||
user: string;
|
user: string;
|
||||||
|
|
@ -6,7 +6,7 @@ export interface fetchProfileOptions {
|
||||||
|
|
||||||
export async function fetchProfile(
|
export async function fetchProfile(
|
||||||
agent: BskyAgent,
|
agent: BskyAgent,
|
||||||
{ user }: fetchProfileOptions
|
{ user }: fetchProfileOptions,
|
||||||
) {
|
) {
|
||||||
return agent.getProfile({
|
return agent.getProfile({
|
||||||
actor: user,
|
actor: user,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Handler } from "hono";
|
import type { Handler } from "hono";
|
||||||
import { HTTPException } from "hono/http-exception";
|
import { HTTPException } from "hono/http-exception";
|
||||||
import { Profile } from "../components/Profile.tsx";
|
import { Profile } from "../components/Profile.tsx";
|
||||||
import { fetchProfile } from "../lib/fetchProfile.ts";
|
import { fetchProfile } from "../lib/fetchProfile.ts";
|
||||||
|
|
@ -20,6 +20,6 @@ export const getProfile: Handler<
|
||||||
profile={data}
|
profile={data}
|
||||||
url={c.req.path}
|
url={c.req.path}
|
||||||
appDomain={process.env.FIXBLUESKY_APP_DOMAIN ?? "bsyy.app"}
|
appDomain={process.env.FIXBLUESKY_APP_DOMAIN ?? "bsyy.app"}
|
||||||
/>
|
/>,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue