Skip to content

Commit

Permalink
style: update newsfeed layout
Browse files Browse the repository at this point in the history
  • Loading branch information
saifulshihab committed Jan 28, 2024
1 parent 326049f commit da30a8e
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 44 deletions.
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cSpell.words": ["clsx", "formik", "Shihab", "signup", "tailwindcss"],
"cSpell.words": [
"clsx",
"formik",
"newsfeed",
"Shihab",
"signup",
"tailwindcss"
],
"css.lint.unknownAtRules": "ignore",
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
Expand Down
15 changes: 0 additions & 15 deletions src/components/layouts/HomePageLayout.tsx

This file was deleted.

23 changes: 23 additions & 0 deletions src/components/layouts/NewsFeedLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React, { PropsWithChildren } from 'react';
import Navbar from '../atoms/navbar';
import MainContentContainer from '../common';
import LeftSidebar from '../organisms/newsfeed/LeftSidebar';
import RightSidebar from '../organisms/newsfeed/RightSidebar';

const NewsFeedLayout: React.FC<PropsWithChildren> = (props) => {
const { children } = props;
return (
<div className="w-full h-full flex flex-col">
<Navbar />
<MainContentContainer>
<div className="flex">
<LeftSidebar />
<div className="flex-1 ">{children}</div>
<RightSidebar />
</div>
</MainContentContainer>
</div>
);
};

export default NewsFeedLayout;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

const LeftSidebar: React.FC = () => {
return (
<div className="w-9/12 h-auto py-3">
<div className="w-[22.5rem] h-auto py-3">
<ul className="w-full text-gray-600">
<li className="h-12 mb-2 flex items-center justify-content cursor-pointer space-x-2 p-2 rounded-md hover:bg-gray-200">
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

const RightSidebar: React.FC = () => {
return (
<div className="w-9/12 h-auto py-3 pr-2">
<div className="w-[22.5rem] h-auto py-3 pr-2">
<div className="w-full text-gray-600 border-b-2 pb-2 mb-2 border-gray-300">
<p className="font-semibold mb-2">Your Pages</p>
<li className="h-12 mb-2 flex items-center -ml-3 justify-content cursor-pointer space-x-2 p-2 rounded-md hover:bg-gray-200">
Expand Down
22 changes: 0 additions & 22 deletions src/components/pages/home/index.tsx

This file was deleted.

File renamed without changes.
12 changes: 12 additions & 0 deletions src/components/pages/newsfeed/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import NewsFeed from './NewsFeed';

const NewsFeedPage: React.FC = () => {
return (
<div className="w-[42.5rem] m-auto">
<NewsFeed />
</div>
);
};

export default NewsFeedPage;
8 changes: 4 additions & 4 deletions src/routes/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import GamingPageLayout from '../components/layouts/GamingPageLayout';
import HomePageLayout from '../components/layouts/HomePageLayout';
import MarketplacePageLayout from '../components/layouts/MarketplacePage';
import NewsFeedLayout from '../components/layouts/NewsFeedLayout';
import ProfilePageLayout from '../components/layouts/ProfilePageLayout';
import WatchPageLayout from '../components/layouts/WatchPageLayout';
import GamingPage from '../components/pages/gaming';
import HomePage from '../components/pages/home';
import LoginPage from '../components/pages/login';
import MarketplacePage from '../components/pages/marketplace';
import NewsFeedPage from '../components/pages/newsfeed';
import PageNotFound from '../components/pages/notfound';
import ProfilePage from '../components/pages/profile';
import RegisterPage from '../components/pages/signup';
Expand All @@ -33,8 +33,8 @@ const Routers: React.FC = () => {
<Route
path={HOME}
element={
<PrivateRoute layout={HomePageLayout}>
<HomePage />
<PrivateRoute layout={NewsFeedLayout}>
<NewsFeedPage />
</PrivateRoute>
}
/>
Expand Down

0 comments on commit da30a8e

Please sign in to comment.