From a71502d19eca316d148a55d81c4158dbeb705dc6 Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Fri, 28 Apr 2023 09:52:12 +0700 Subject: [PATCH] fix the mess I started --- src/app/channel/layout.tsx | 2 +- src/app/channel/pages/index.page.tsx | 24 +++--- src/app/chat/layout.tsx | 2 +- src/app/newsfeed/components/contentParser.tsx | 56 +++++++++++++ .../newsfeed/components/form.tsx} | 46 ++++++----- .../newsfeed/components}/note/base.tsx | 18 ++-- src/app/newsfeed/components/note/comment.tsx | 24 ++++++ .../components}/note/meta/comment.tsx | 0 .../components}/note/meta/reaction.tsx | 0 .../newsfeed/components}/note/metadata.tsx | 0 .../newsfeed/components}/note/parent.tsx | 23 ++---- .../newsfeed/components}/note/placeholder.tsx | 0 .../components}/note/preview/image.tsx | 0 .../components}/note/preview/video.tsx | 0 .../components}/note/preview/youtube.tsx | 0 .../newsfeed/components}/note/quote.tsx | 13 ++- .../newsfeed/components}/note/quoteRepost.tsx | 6 +- .../newsfeed/components}/note/rootNote.tsx | 23 ++---- .../newsfeed/components/user/default.tsx} | 2 +- .../newsfeed/components}/user/mention.tsx | 2 +- .../newsfeed/components/user/repost.tsx} | 2 +- src/app/newsfeed/layout.tsx | 2 +- .../newsfeed/pages/following/index.page.tsx | 10 +-- src/auth/pages/create/step-3/index.page.tsx | 3 +- src/auth/pages/import/step-2/index.page.tsx | 3 +- src/shared/appHeader.tsx | 5 +- src/shared/eventCollector.tsx | 49 +++++------ src/shared/layouts/channel.tsx | 31 ------- src/shared/layouts/newsfeed.tsx | 29 ------- src/shared/layouts/onboarding.tsx | 17 ---- src/shared/navigation.tsx | 4 +- src/shared/note/comment.tsx | 82 ------------------- src/shared/note/extend.tsx | 82 ------------------- src/utils/hooks/useActiveAccount.tsx | 15 ++++ src/utils/transform.tsx | 2 +- 35 files changed, 197 insertions(+), 380 deletions(-) create mode 100644 src/app/newsfeed/components/contentParser.tsx rename src/{shared/form/base.tsx => app/newsfeed/components/form.tsx} (74%) rename src/{shared => app/newsfeed/components}/note/base.tsx (73%) create mode 100644 src/app/newsfeed/components/note/comment.tsx rename src/{shared => app/newsfeed/components}/note/meta/comment.tsx (100%) rename src/{shared => app/newsfeed/components}/note/meta/reaction.tsx (100%) rename src/{shared => app/newsfeed/components}/note/metadata.tsx (100%) rename src/{shared => app/newsfeed/components}/note/parent.tsx (79%) rename src/{shared => app/newsfeed/components}/note/placeholder.tsx (100%) rename src/{shared => app/newsfeed/components}/note/preview/image.tsx (100%) rename src/{shared => app/newsfeed/components}/note/preview/video.tsx (100%) rename src/{shared => app/newsfeed/components}/note/preview/youtube.tsx (100%) rename src/{shared => app/newsfeed/components}/note/quote.tsx (78%) rename src/{shared => app/newsfeed/components}/note/quoteRepost.tsx (73%) rename src/{shared => app/newsfeed/components}/note/rootNote.tsx (71%) rename src/{shared/user/extend.tsx => app/newsfeed/components/user/default.tsx} (93%) rename src/{shared => app/newsfeed/components}/user/mention.tsx (80%) rename src/{shared/user/quoteRepost.tsx => app/newsfeed/components/user/repost.tsx} (93%) delete mode 100644 src/shared/layouts/channel.tsx delete mode 100644 src/shared/layouts/newsfeed.tsx delete mode 100644 src/shared/layouts/onboarding.tsx delete mode 100644 src/shared/note/comment.tsx delete mode 100644 src/shared/note/extend.tsx create mode 100644 src/utils/hooks/useActiveAccount.tsx diff --git a/src/app/channel/layout.tsx b/src/app/channel/layout.tsx index 6dfdf837..25e53586 100644 --- a/src/app/channel/layout.tsx +++ b/src/app/channel/layout.tsx @@ -4,7 +4,7 @@ import Navigation from '@lume/shared/navigation'; export function LayoutChannel({ children }: { children: React.ReactNode }) { return ( -