This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc8f793
commit f918c40
Showing
45 changed files
with
792 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { getTDocPage } from "@/app/references/components/TDoc/PageLayout"; | ||
import { fetchTypeScriptDoc } from "@/app/references/components/TDoc/fetchDocs/fetchTypeScriptDoc"; | ||
|
||
const config = getTDocPage({ | ||
sdkTitle: "TypeScript SDK", | ||
getDoc: fetchTypeScriptDoc, | ||
packageSlug: "typescript", | ||
async getVersions() { | ||
return ["v4", "v5"]; | ||
}, | ||
metadataIcon: "typescript", | ||
}); | ||
|
||
export default config.default; | ||
export const generateStaticParams = config.generateStaticParams; | ||
export const generateMetadata = config.generateMetadata; | ||
export const dynamic = config.dynamic; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { DocLayout } from "@/components/Layouts/DocLayout"; | ||
import { createMetadata } from "@doc"; | ||
import { sidebar } from "./sidebar"; | ||
import { VersionSelector } from "../../../components/others/VersionSelector"; | ||
|
||
export default async function Layout(props: { children: React.ReactNode }) { | ||
return ( | ||
<DocLayout | ||
sideBar={sidebar} | ||
editPageButton={true} | ||
sidebarHeader={ | ||
<div className="flex items-center gap-1"> | ||
<p className="py-5 text-lg font-semibold text-f-100">Connect SDK</p> | ||
<VersionSelector | ||
versions={[ | ||
{ | ||
name: "v4", | ||
href: "/react-native/v4/", | ||
}, | ||
{ | ||
name: "v5", | ||
href: "/react-native/v5/", | ||
}, | ||
]} | ||
selected={"v5"} | ||
/> | ||
</div> | ||
} | ||
> | ||
<div data-noindex>{props.children}</div> | ||
</DocLayout> | ||
); | ||
} | ||
|
||
export const metadata = createMetadata({ | ||
title: "thirdweb React Native SDK", | ||
description: | ||
"A type-safe library to interact with any EVM-compatible blockchain in React Native applications", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
import type { SideBar } from "../../../components/Layouts/DocLayout"; | ||
import { ReactIcon } from "../../../icons"; | ||
import { fetchTypeScriptDoc } from "../../references/components/TDoc/fetchDocs/fetchTypeScriptDoc"; | ||
import { getCustomTag } from "../../references/components/TDoc/utils/getSidebarLinkgroups"; | ||
|
||
const slug = "/react-native/v5"; | ||
const docs = await fetchTypeScriptDoc("v5"); | ||
|
||
export const sidebar: SideBar = { | ||
name: "Connect React Native SDK", | ||
links: [ | ||
{ | ||
icon: <ReactIcon className="size-4" />, | ||
name: "React Native", | ||
isCollapsible: false, | ||
links: [ | ||
{ | ||
separator: true, | ||
}, | ||
{ | ||
name: "Overview", | ||
href: slug, | ||
}, | ||
{ | ||
name: "Getting Started", | ||
href: `${slug}/getting-started`, | ||
}, | ||
{ | ||
name: "Differences from React", | ||
href: `${slug}/differences`, | ||
}, | ||
{ | ||
name: "Core", | ||
isCollapsible: false, | ||
links: [ | ||
{ | ||
name: "ThirdwebProvider", | ||
href: `${slug}/ThirdwebProvider`, | ||
}, | ||
{ | ||
name: "Themes", | ||
links: | ||
docs.functions | ||
?.filter((f) => { | ||
const [tag] = getCustomTag(f) || []; | ||
return tag === "@theme"; | ||
}) | ||
?.map((f) => ({ | ||
name: f.name, | ||
href: `${slug}/${f.name}`, | ||
})) || [], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "Wallets", | ||
isCollapsible: false, | ||
links: [ | ||
{ | ||
name: "UI Components", | ||
href: `${slug}/connecting-wallets/ui-components`, | ||
links: | ||
docs.components | ||
?.filter((hook) => { | ||
// TODO should tag individual components | ||
return hook.name.toLowerCase().includes("connect"); | ||
}) | ||
?.map((hook) => ({ | ||
name: hook.name, | ||
href: `${slug}/${hook.name}`, | ||
})) || [], | ||
}, | ||
{ | ||
name: "Connection Hooks", | ||
href: `${slug}/connecting-wallets/hooks`, | ||
links: | ||
docs.hooks | ||
?.filter((hook) => { | ||
const [tag] = getCustomTag(hook) || []; | ||
return tag === "@walletConnection"; | ||
}) | ||
?.map((hook) => ({ | ||
name: hook.name, | ||
href: `${slug}/${hook.name}`, | ||
})) || [], | ||
}, | ||
{ | ||
name: "Wallet Hooks", | ||
links: | ||
docs.hooks | ||
?.filter((hook) => { | ||
const [tag] = getCustomTag(hook) || []; | ||
return tag === "@wallet"; | ||
}) | ||
?.map((hook) => ({ | ||
name: hook.name, | ||
href: `${slug}/${hook.name}`, | ||
})) || [], | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "Blockchain API", | ||
isCollapsible: false, | ||
links: [ | ||
{ | ||
name: "UI Components", | ||
links: | ||
docs.components | ||
?.filter((hook) => { | ||
// TODO should tag individual components | ||
return !hook.name.toLowerCase().includes("connect"); | ||
}) | ||
?.map((hook) => ({ | ||
name: hook.name, | ||
href: `${slug}/${hook.name}`, | ||
})) || [], | ||
}, | ||
{ | ||
name: "Reading State", | ||
href: `${slug}/reading-state`, | ||
links: | ||
docs.hooks | ||
?.filter((hook) => { | ||
const [tag] = getCustomTag(hook) || []; | ||
return tag === "@contract"; | ||
}) | ||
?.map((hook) => ({ | ||
name: hook.name, | ||
href: `${slug}/${hook.name}`, | ||
})) || [], | ||
}, | ||
{ | ||
name: "Transactions", | ||
href: `${slug}/transactions`, | ||
links: | ||
docs.hooks | ||
?.filter((hook) => { | ||
const [tag] = getCustomTag(hook) || []; | ||
return tag === "@transaction"; | ||
}) | ||
?.map((hook) => ({ | ||
name: hook.name, | ||
href: `${slug}/${hook.name}`, | ||
})) || [], | ||
}, | ||
{ | ||
name: "Extensions", | ||
href: `${slug}/extensions`, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ | ||
separator: true, | ||
}, | ||
{ | ||
name: "Full Reference", | ||
href: "/references/typescript/v5/hooks", | ||
isCollapsible: false, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { getTDocPage } from "@/app/references/components/TDoc/PageLayout"; | ||
import { fetchTypeScriptDoc } from "@/app/references/components/TDoc/fetchDocs/fetchTypeScriptDoc"; | ||
|
||
const config = getTDocPage({ | ||
sdkTitle: "TypeScript SDK", | ||
getDoc: fetchTypeScriptDoc, | ||
packageSlug: "typescript", | ||
async getVersions() { | ||
return ["v4", "v5"]; | ||
}, | ||
metadataIcon: "typescript", | ||
}); | ||
|
||
export default config.default; | ||
export const generateStaticParams = config.generateStaticParams; | ||
export const generateMetadata = config.generateMetadata; | ||
export const dynamic = config.dynamic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes
Oops, something went wrong.