Merge remote-tracking branch 'hub/create-settings-page' into dev

This commit is contained in:
tonyrewin 2023-02-01 11:06:43 +03:00
commit a330684621
5 changed files with 25 additions and 13 deletions

View File

@ -0,0 +1,8 @@
import { PageWrap } from '../_shared/PageWrap'
export const CreateSettingsPage = () => {
return <PageWrap>Настройки публикации</PageWrap>
}
// for lazy loading
export default CreateSettingsPage

View File

@ -35,6 +35,7 @@ import { SessionProvider } from '../context/session'
import { ProfileSettingsPage } from './Pages/profile/ProfileSettingsPage' import { ProfileSettingsPage } from './Pages/profile/ProfileSettingsPage'
import { ProfileSecurityPage } from './Pages/profile/ProfileSecurityPage' import { ProfileSecurityPage } from './Pages/profile/ProfileSecurityPage'
import { ProfileSubscriptionsPage } from './Pages/profile/ProfileSubscriptionsPage' import { ProfileSubscriptionsPage } from './Pages/profile/ProfileSubscriptionsPage'
import CreateSettingsPage from './Pages/CreateSettingsPage'
// TODO: lazy load // TODO: lazy load
// const SomePage = lazy(() => import('./Pages/SomePage')) // const SomePage = lazy(() => import('./Pages/SomePage'))
@ -44,6 +45,7 @@ const pagesMap: Record<keyof Routes, Component<PageProps>> = {
expo: LayoutShoutsPage, expo: LayoutShoutsPage,
connect: ConnectPage, connect: ConnectPage,
create: CreatePage, create: CreatePage,
createSettings: CreateSettingsPage,
home: HomePage, home: HomePage,
topics: AllTopicsPage, topics: AllTopicsPage,
topic: TopicPage, topic: TopicPage,

View File

@ -1,13 +0,0 @@
---
import { Root } from '../components/Root'
import Prerendered from '../main.astro'
import { initRouter } from '../stores/router'
const { pathname, search } = Astro.url
initRouter(pathname, search)
---
<Prerendered>
<Root client:load />
</Prerendered>

View File

@ -0,0 +1,13 @@
---
import { Root } from '../../components/Root'
import Prerendered from '../../main.astro'
import { initRouter } from '../../stores/router'
const { pathname, search } = Astro.url
initRouter(pathname, search)
---
<Prerendered>
<Root client:load />
</Prerendered>

View File

@ -8,6 +8,7 @@ export interface Routes {
home: void home: void
connect: void connect: void
create: void create: void
createSettings: void
topics: void topics: void
topic: 'slug' topic: 'slug'
authors: void authors: void
@ -39,6 +40,7 @@ const routerStore = createRouter<Routes>(
inbox: '/inbox', inbox: '/inbox',
connect: '/connect', connect: '/connect',
create: '/create', create: '/create',
createSettings: '/create/settings',
topics: '/topics', topics: '/topics',
topic: '/topic/:slug', topic: '/topic/:slug',
authors: '/authors', authors: '/authors',