mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
get tabs from component
This commit is contained in:
parent
9d8903b7b7
commit
892262dc3e
@ -6,36 +6,10 @@ import { Icons, createIconRender } from "components/Icons"
|
||||
|
||||
import { HashtagTrendings, FeaturedEventsAnnouncements, ConnectedFriends } from "components"
|
||||
|
||||
import FeedTab from "./components/feed"
|
||||
import ExploreTab from "./components/explore"
|
||||
import TrendingsTab from "./components/trendings"
|
||||
import SavedPostsTab from "./components/savedPosts"
|
||||
import Tabs from "./tabs"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
const Tabs = {
|
||||
"feed": {
|
||||
title: "Feed",
|
||||
icon: "Rss",
|
||||
component: FeedTab
|
||||
},
|
||||
"trendings": {
|
||||
title: "Trendings",
|
||||
icon: "TrendingUp",
|
||||
component: TrendingsTab
|
||||
},
|
||||
"explore": {
|
||||
title: "Explore",
|
||||
icon: "Search",
|
||||
component: ExploreTab
|
||||
},
|
||||
"savedPosts": {
|
||||
title: "Saved posts",
|
||||
icon: "Bookmark",
|
||||
component: SavedPostsTab
|
||||
}
|
||||
}
|
||||
|
||||
export default class Dashboard extends React.Component {
|
||||
state = {
|
||||
activeTab: this.props.match.params.type ?? "feed"
|
||||
|
@ -2,36 +2,10 @@ import React from "react"
|
||||
import * as antd from "antd"
|
||||
import classnames from "classnames"
|
||||
|
||||
import FeedTab from "./components/feed"
|
||||
import ExploreTab from "./components/explore"
|
||||
import TrendingsTab from "./components/trendings"
|
||||
import SavedPostsTab from "./components/savedPosts"
|
||||
import Tabs from "./tabs"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
const Tabs = {
|
||||
"feed": {
|
||||
title: "Feed",
|
||||
icon: "Rss",
|
||||
component: FeedTab
|
||||
},
|
||||
"trendings": {
|
||||
title: "Trendings",
|
||||
icon: "TrendingUp",
|
||||
component: TrendingsTab
|
||||
},
|
||||
"explore": {
|
||||
title: "Explore",
|
||||
icon: "Search",
|
||||
component: ExploreTab
|
||||
},
|
||||
"savedPosts": {
|
||||
title: "Saved posts",
|
||||
icon: "Bookmark",
|
||||
component: SavedPostsTab
|
||||
}
|
||||
}
|
||||
|
||||
export default class Dashboard extends React.Component {
|
||||
state = {
|
||||
activeTab: this.props.match.params.type ?? "feed"
|
||||
|
27
packages/app/src/pages/home/tabs.jsx
Normal file
27
packages/app/src/pages/home/tabs.jsx
Normal file
@ -0,0 +1,27 @@
|
||||
import FeedTab from "./components/feed"
|
||||
import ExploreTab from "./components/explore"
|
||||
import TrendingsTab from "./components/trendings"
|
||||
import SavedPostsTab from "./components/savedPosts"
|
||||
|
||||
export default {
|
||||
"feed": {
|
||||
title: "Feed",
|
||||
icon: "Rss",
|
||||
component: FeedTab
|
||||
},
|
||||
"explore": {
|
||||
title: "Explore",
|
||||
icon: "Search",
|
||||
component: ExploreTab
|
||||
},
|
||||
"trendings": {
|
||||
title: "Trendings",
|
||||
icon: "TrendingUp",
|
||||
component: TrendingsTab
|
||||
},
|
||||
"savedPosts": {
|
||||
title: "Saved posts",
|
||||
icon: "Bookmark",
|
||||
component: SavedPostsTab
|
||||
}
|
||||
}
|
@ -4,30 +4,10 @@ import classnames from "classnames"
|
||||
|
||||
import { Icons, createIconRender } from "components/Icons"
|
||||
|
||||
import FeedTab from "./components/feed"
|
||||
import ExploreTab from "./components/explore"
|
||||
import ControlPanelTab from "./components/controlPanel"
|
||||
import Tabs from "./tabs"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
const Tabs = {
|
||||
"feed": {
|
||||
title: "Feed",
|
||||
icon: "Rss",
|
||||
component: FeedTab
|
||||
},
|
||||
"explore": {
|
||||
title: "Explore",
|
||||
icon: "Search",
|
||||
component: ExploreTab
|
||||
},
|
||||
"controlPanel": {
|
||||
title: "Control Panel",
|
||||
icon: "Settings",
|
||||
component: ControlPanelTab
|
||||
}
|
||||
}
|
||||
|
||||
export default class TVDashboard extends React.Component {
|
||||
state = {
|
||||
activeTab: this.props.match.params.type ?? "feed"
|
||||
|
21
packages/app/src/pages/tv/tabs.jsx
Normal file
21
packages/app/src/pages/tv/tabs.jsx
Normal file
@ -0,0 +1,21 @@
|
||||
import FeedTab from "./components/feed"
|
||||
import ExploreTab from "./components/explore"
|
||||
import ControlPanelTab from "./components/controlPanel"
|
||||
|
||||
export default {
|
||||
"feed": {
|
||||
title: "Feed",
|
||||
icon: "Rss",
|
||||
component: FeedTab
|
||||
},
|
||||
"explore": {
|
||||
title: "Explore",
|
||||
icon: "Search",
|
||||
component: ExploreTab
|
||||
},
|
||||
"controlPanel": {
|
||||
title: "Control Panel",
|
||||
icon: "Settings",
|
||||
component: ControlPanelTab
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user