mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
move home
to timeline
This commit is contained in:
parent
da4c068b47
commit
362560440a
@ -1,13 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"id": "home",
|
|
||||||
"path": "/",
|
|
||||||
"label": "Home",
|
|
||||||
"icon": "Home"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "timeline",
|
"id": "timeline",
|
||||||
"path": "/",
|
"path": "/timeline",
|
||||||
"label": "Timeline",
|
"label": "Timeline",
|
||||||
"icon": "MdTag"
|
"icon": "MdTag"
|
||||||
},
|
},
|
||||||
|
36
packages/app/src/pages/index.jsx
Executable file → Normal file
36
packages/app/src/pages/index.jsx
Executable file → Normal file
@ -1,33 +1,5 @@
|
|||||||
import React from "react"
|
const HomePage = () => {
|
||||||
import { Translation } from "react-i18next"
|
return app.location.push("/timeline")
|
||||||
|
}
|
||||||
|
|
||||||
import { PagePanelWithNavMenu } from "@components/PagePanels"
|
export default HomePage
|
||||||
|
|
||||||
import Tabs from "./home/tabs"
|
|
||||||
|
|
||||||
export default class Home extends React.Component {
|
|
||||||
render() {
|
|
||||||
return <PagePanelWithNavMenu
|
|
||||||
tabs={Tabs}
|
|
||||||
extraItems={[
|
|
||||||
{
|
|
||||||
key: "create",
|
|
||||||
icon: "PlusCircle",
|
|
||||||
label: <Translation>{(t) => t("Create")}</Translation>,
|
|
||||||
props: {
|
|
||||||
type: "primary",
|
|
||||||
onClick: app.controls.openPostCreator
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
onTabChange={() => {
|
|
||||||
app.layout.scrollTo({
|
|
||||||
top: 0,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
useSetQueryType
|
|
||||||
transition
|
|
||||||
masked
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
}
|
|
33
packages/app/src/pages/timeline/index.jsx
Executable file
33
packages/app/src/pages/timeline/index.jsx
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
import React from "react"
|
||||||
|
import { Translation } from "react-i18next"
|
||||||
|
|
||||||
|
import { PagePanelWithNavMenu } from "@components/PagePanels"
|
||||||
|
|
||||||
|
import Tabs from "./tabs"
|
||||||
|
|
||||||
|
export default class Home extends React.Component {
|
||||||
|
render() {
|
||||||
|
return <PagePanelWithNavMenu
|
||||||
|
tabs={Tabs}
|
||||||
|
extraItems={[
|
||||||
|
{
|
||||||
|
key: "create",
|
||||||
|
icon: "PlusCircle",
|
||||||
|
label: <Translation>{(t) => t("Create")}</Translation>,
|
||||||
|
props: {
|
||||||
|
type: "primary",
|
||||||
|
onClick: app.controls.openPostCreator
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
onTabChange={() => {
|
||||||
|
app.layout.scrollTo({
|
||||||
|
top: 0,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
useSetQueryType
|
||||||
|
transition
|
||||||
|
masked
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@ import React from "react"
|
|||||||
|
|
||||||
import { PagePanelWithNavMenu } from "@components/PagePanels"
|
import { PagePanelWithNavMenu } from "@components/PagePanels"
|
||||||
|
|
||||||
import Tabs from "./home/tabs"
|
import Tabs from "./tabs"
|
||||||
|
|
||||||
export default class Home extends React.Component {
|
export default class Home extends React.Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
Loading…
x
Reference in New Issue
Block a user