From f7cba5b305766980a4cf62fd22861c0748ba7f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 29 Sep 2024 13:45:21 +0200 Subject: [PATCH] pl-fe: Improve styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../pl-fe/src/components/ui/layout/layout.tsx | 25 ++++++++++++------- .../pl-fe/src/features/bookmarks/index.tsx | 2 +- .../src/features/bubble-timeline/index.tsx | 2 +- .../src/features/community-timeline/index.tsx | 2 +- .../src/features/hashtag-timeline/index.tsx | 2 +- .../src/features/home-timeline/index.tsx | 2 +- .../src/features/landing-timeline/index.tsx | 2 +- .../src/features/list-timeline/index.tsx | 2 +- .../src/features/public-timeline/index.tsx | 2 +- packages/pl-fe/src/features/quotes/index.tsx | 2 +- .../src/features/remote-timeline/index.tsx | 2 +- 11 files changed, 26 insertions(+), 19 deletions(-) diff --git a/packages/pl-fe/src/components/ui/layout/layout.tsx b/packages/pl-fe/src/components/ui/layout/layout.tsx index 7bf282a2d..b63b659c6 100644 --- a/packages/pl-fe/src/components/ui/layout/layout.tsx +++ b/packages/pl-fe/src/components/ui/layout/layout.tsx @@ -2,6 +2,8 @@ import clsx from 'clsx'; import React, { Suspense } from 'react'; import StickyBox from 'react-sticky-box'; +import { useFeatures } from 'pl-fe/hooks'; + interface ISidebar { children: React.ReactNode; } @@ -38,15 +40,20 @@ const Sidebar: React.FC = ({ children }) => ( ); /** Center column container in the UI. */ -const Main: React.FC> = ({ children, className }) => ( -
- {children} -
-); +const Main: React.FC> = ({ children, className }) => { + const features = useFeatures(); + + return ( +
+ {children} +
+ ); +}; /** Right sidebar container in the UI. */ const Aside: React.FC = ({ children }) => ( diff --git a/packages/pl-fe/src/features/bookmarks/index.tsx b/packages/pl-fe/src/features/bookmarks/index.tsx index da107ccee..8fe153e94 100644 --- a/packages/pl-fe/src/features/bookmarks/index.tsx +++ b/packages/pl-fe/src/features/bookmarks/index.tsx @@ -110,7 +110,7 @@ const Bookmarks: React.FC = ({ params }) => { > { { = ({ params }) => { )} { { {timelineEnabled ? ( { transparent={!isMobile} > { } { return ( } scrollKey={`quotes:${statusId}`} diff --git a/packages/pl-fe/src/features/remote-timeline/index.tsx b/packages/pl-fe/src/features/remote-timeline/index.tsx index e637048cf..7f12d23e7 100644 --- a/packages/pl-fe/src/features/remote-timeline/index.tsx +++ b/packages/pl-fe/src/features/remote-timeline/index.tsx @@ -66,7 +66,7 @@ const RemoteTimeline: React.FC = ({ params }) => { )}