-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(board-components): 使用悬念版API并重构信息组件
- 将 `useSelf` 迁移到 `@liveblocks/react/suspense`。 - 重构 `Info` 组件,使用客户端导入,并添加 `boardId` 属性。 - 单独导出 `InfoSkeleton`、`ParticipantsSkeleton` 和 `ToolbarSkeleton` 组件。 - 更新 `Loading` 组件以使用单独导出的骨架组件。 - 修正语法错误和组件属性。 - 调整 `Button` 组件样式,增加 `board` 和 `boardActive` 变体。 - 重构 `Room` 组件中的注释以提高清晰度。 BREAKING CHANGE: `Info`, `Participants`, 和 `Toolbar` 组件现在有新的属性和导出。请确保在迁移时更新组件引用。
- Loading branch information
1 parent
68a11ea
commit a6fe86a
Showing
8 changed files
with
96 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
|
||
|
||
import { Loader } from "lucide-react"; | ||
|
||
import { Skeleton } from "@/components/ui/skeleton"; | ||
import { Info } from "./info"; | ||
import { Participants } from "./participants"; | ||
import { Toolbar } from "./toolbar"; | ||
import { InfoSkeleton } from "./info"; // Don't need the ''use client" through the export InfoSkeleton separately | ||
import { ParticipantsSkeleton } from "./participants"; // So does ParticipantsSkeleton | ||
import { ToolbarSkeleton } from "./toolbar"; // So does ToolbarSkeleton | ||
|
||
export const Loading = () => { | ||
return ( | ||
<main | ||
className="w-full h-full relative bg-neutral-100 touch-none | ||
flex items-center justify-center"> | ||
<Loader className="h-6 w-6 text-muted-foreground animate-spin" /> | ||
<Info.Skeleton /> | ||
<Participants.Skeleton /> | ||
<Toolbar.Skeleton /> | ||
<InfoSkeleton /> | ||
<ParticipantsSkeleton /> | ||
<ToolbarSkeleton /> | ||
</main> | ||
); | ||
}; |
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