Skip to content

Commit 4397fff

Browse files
committed
refactor: use client/loading/server lazy load pattern
1 parent 9a33aa6 commit 4397fff

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed

app/[locale]/wallets/find-wallet/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { Lang } from "@/lib/types"
99

1010
import Breadcrumbs from "@/components/Breadcrumbs"
11-
import FindWalletProductTable from "@/components/FindWalletProductTable/lazy"
11+
import FindWalletProductTable from "@/components/FindWalletProductTable/server"
1212
import I18nProvider from "@/components/I18nProvider"
1313
import MainArticle from "@/components/MainArticle"
1414

src/components/FindWalletProductTable/FindWalletProductTable.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/react"
22

33
import { Lang } from "@/lib/types"
44

5-
import FindWalletProductTable from "@/components/FindWalletProductTable"
5+
import FindWalletProductTable from "@/components/FindWalletProductTable/client"
66

77
import OneInchWalletImage from "@/public/images/wallets/1inch.png"
88
import FoxWalletImage from "@/public/images/wallets/foxwallet.png"

src/components/FindWalletProductTable/loading.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const WalletSkeleton = () => (
2525
))}
2626
</>
2727
)
28+
2829
const Loading = () => (
2930
<div className="flex flex-col gap-16 px-4 lg:gap-20">
3031
<div className="flex max-w-full gap-4 overflow-x-scroll lg:grid lg:grid-cols-5">

src/components/FindWalletProductTable/lazy.tsx renamed to src/components/FindWalletProductTable/server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dynamic from "next/dynamic"
22

33
import Loading from "./loading"
44

5-
export default dynamic(() => import("./index"), {
5+
export default dynamic(() => import("./client"), {
66
ssr: false,
77
loading: Loading,
88
})

0 commit comments

Comments
 (0)