move home to timeline

This commit is contained in:
SrGooglo 2024-09-15 16:18:47 +00:00
parent da4c068b47
commit 362560440a
11 changed files with 39 additions and 40 deletions

View File

@ -1,13 +1,7 @@
[
{
"id": "home",
"path": "/",
"label": "Home",
"icon": "Home"
},
{
"id": "timeline",
"path": "/",
"path": "/timeline",
"label": "Timeline",
"icon": "MdTag"
},

36
packages/app/src/pages/index.jsx Executable file → Normal file
View File

@ -1,33 +1,5 @@
import React from "react"
import { Translation } from "react-i18next"
import { PagePanelWithNavMenu } from "@components/PagePanels"
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
/>
}
const HomePage = () => {
return app.location.push("/timeline")
}
export default HomePage

View 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
/>
}
}

View File

@ -2,7 +2,7 @@ import React from "react"
import { PagePanelWithNavMenu } from "@components/PagePanels"
import Tabs from "./home/tabs"
import Tabs from "./tabs"
export default class Home extends React.Component {
componentDidMount() {