This repository was archived by the owner on Mar 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 249
fix: i18n in app router #496
Merged
DIYgod
merged 7 commits into
Crossbell-Box:feature/nextjs-app-router
from
enpitsuLin:feature/nextjs-app-router
May 6, 2023
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
162cd5c
refactor: i18n configuration move to lib dir
enpitsuLin d3fb162
fix: add "use client" directive
enpitsuLin 541a7b7
refactor: remove query.lang
enpitsuLin b35de9f
fix: complete index page
enpitsuLin bc79b06
feat: i18n in index page
enpitsuLin 296e5b1
fix: i18n in EntranceButton
enpitsuLin 3bf84da
Merge branch 'feature/nextjs-app-router' into feature/nextjs-app-router
enpitsuLin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,142 @@ | ||
| "use client" | ||
|
|
||
| import { | ||
| CrossbellChainLogo, | ||
| XCharLogo, | ||
| XFeedLogo, | ||
| XShopLogo, | ||
| XSyncLogo, | ||
| } from "@crossbell/ui" | ||
| import { RssIcon } from "@heroicons/react/24/outline" | ||
|
|
||
| import { Image } from "~/components/ui/Image" | ||
| import { Tooltip } from "~/components/ui/Tooltip" | ||
| import { UniLink } from "~/components/ui/UniLink" | ||
| import { getSiteLink } from "~/lib/helpers" | ||
|
|
||
| export function Integration() { | ||
| const integrations = [ | ||
| { | ||
| name: "RSS", | ||
| icon: <RssIcon className="w-full h-full text-orange-500" />, | ||
| url: | ||
| getSiteLink({ | ||
| subdomain: "xlog", | ||
| }) + "/feed?format=xml", | ||
| }, | ||
| { | ||
| name: "JSON Feed", | ||
| icon: <Image src="/assets/json-feed.png" alt="JSON Feed" />, | ||
| url: | ||
| getSiteLink({ | ||
| subdomain: "xlog", | ||
| }) + "/feed", | ||
| }, | ||
| { | ||
| name: "xChar", | ||
| icon: <XCharLogo className="w-full h-full" />, | ||
| url: "https://xchar.app/", | ||
| }, | ||
| { | ||
| name: "xFeed", | ||
| icon: <XFeedLogo className="w-full h-full" />, | ||
| url: "https://crossbell.io/feed", | ||
| }, | ||
| { | ||
| name: "xSync", | ||
| icon: <XSyncLogo className="w-full h-full" />, | ||
| url: "https://xsync.app/", | ||
| }, | ||
| { | ||
| name: "xShop", | ||
| icon: <XShopLogo className="w-full h-full" />, | ||
| text: "Coming soon", | ||
| }, | ||
| { | ||
| name: "Crossbell Scan", | ||
| icon: <CrossbellChainLogo className="w-full h-full text-[#E7B75B]" />, | ||
| url: "https://scan.crossbell.io/", | ||
| }, | ||
| { | ||
| name: "Crossbell Faucet", | ||
| icon: <CrossbellChainLogo className="w-full h-full text-[#E7B75B]" />, | ||
| url: "https://faucet.crossbell.io/", | ||
| }, | ||
| { | ||
| name: "Crossbell Export", | ||
| icon: <CrossbellChainLogo className="w-full h-full text-[#E7B75B]" />, | ||
| url: "https://export.crossbell.io/", | ||
| }, | ||
| { | ||
| name: "Crossbell SDK", | ||
| icon: <CrossbellChainLogo className="w-full h-full text-[#E7B75B]" />, | ||
| url: "https://crossbell-box.github.io/crossbell.js/", | ||
| }, | ||
| { | ||
| name: "RSS3", | ||
| icon: ( | ||
| <Image alt="RSS3" src="/assets/rss3.svg" className="rounded" fill /> | ||
| ), | ||
| url: "https://rss3.io/", | ||
| }, | ||
| { | ||
| name: "Hoot It", | ||
| icon: ( | ||
| <Image alt="Hoot It" src="/assets/hoot.svg" className="rounded" fill /> | ||
| ), | ||
| url: "https://hoot.it/search/xLog", | ||
| }, | ||
| { | ||
| name: "Raycast", | ||
| icon: <Image src="/assets/raycast.png" alt="Raycast" />, | ||
| url: "https://www.raycast.com/Songkeys/crossbell", | ||
| }, | ||
| { | ||
| name: "Obsidian", | ||
| icon: ( | ||
| <Image | ||
| src="/assets/obsidian.svg" | ||
| alt="Obsidian" | ||
| className="rounded" | ||
| fill | ||
| /> | ||
| ), | ||
| text: "Coming soon", | ||
| }, | ||
| ] | ||
| return ( | ||
| <> | ||
| {integrations.map((item, index) => ( | ||
| <li | ||
| className="hover:scale-105 transition-transform duration-300" | ||
| key={index} | ||
| > | ||
| {item.url ? ( | ||
| <UniLink | ||
| href={item.url} | ||
| className="w-full flex items-center flex-col justify-center" | ||
| > | ||
| <div className="w-12 h-12 rounded-md overflow-hidden"> | ||
| {item.icon} | ||
| </div> | ||
| <div className="font-medium sm:text-lg mt-2 text-center"> | ||
| {item.name} | ||
| </div> | ||
| </UniLink> | ||
| ) : ( | ||
| <Tooltip label={item.text!}> | ||
| <div className="w-full h-full flex items-center flex-col justify-center"> | ||
| <div className="w-12 h-12 rounded-md overflow-hidden"> | ||
| {item.icon} | ||
| </div> | ||
| <div className="font-medium sm:text-lg mt-2 text-center"> | ||
| {item.name} | ||
| </div> | ||
| </div> | ||
| </Tooltip> | ||
| )} | ||
| </li> | ||
| ))} | ||
| </> | ||
| ) | ||
| } | ||
This file contains hidden or 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,24 @@ | ||
| "use client" | ||
|
|
||
| import { FollowAllButton } from "~/components/common/FollowAllButton" | ||
| import { useGetShowcase } from "~/queries/home" | ||
|
|
||
| import ShowcaseList from "./ShowcaseList" | ||
|
|
||
| export function ShowCase() { | ||
| const showcaseSites = useGetShowcase() | ||
| return ( | ||
| <> | ||
| <FollowAllButton | ||
| className="mt-5" | ||
| size="xl" | ||
| characterIds={showcaseSites.data | ||
| ?.map((s: { characterId?: string }) => s.characterId) | ||
| .filter(Boolean) | ||
| .map(Number)} | ||
| siteIds={showcaseSites.data?.map((s: { handle: string }) => s.handle)} | ||
| /> | ||
| <ShowcaseList sites={showcaseSites.data} /> | ||
| </> | ||
| ) | ||
| } |
File renamed without changes.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ export default async function HomeLayout({ | |
| }) { | ||
| return ( | ||
| <> | ||
| {/* @ts-expect-error RSC */} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <Header /> | ||
| {children} | ||
| <footer className="mt-10 font-medium border-t"> | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some component in
@crossbell/uicause RSC error