Skip to content

Commit

Permalink
feat: graph-mindset
Browse files Browse the repository at this point in the history
  • Loading branch information
Rassl committed Nov 20, 2024
1 parent a4148ca commit 6273360
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/components/AppContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ import { AppProviders } from '../App/Providers'
import { AuthGuard } from '../Auth'

const LazyApp = lazy(() => import('../App').then(({ App }) => ({ default: App })))
const LazyMindSet = lazy(() => import('../../modules').then(({ MindSet }) => ({ default: MindSet })))

export const AppContainer = () => {
const App = <LazyApp />
const MindSet = <LazyMindSet />

return (
<AppProviders>
<Suspense fallback={<div>Loading...</div>}>
<AuthGuard>
<Routes>
<Route element={App} path="/" />
<Route element={App} path="/search" />
<Route element={App} path="*" />
</Routes>
</AuthGuard>
<Routes>
<Route element={MindSet} path="/mindset" />
<Route element={<AuthGuard>{App}</AuthGuard>} path="/" />
<Route element={<AuthGuard>{App}</AuthGuard>} path="/search" />
<Route element={<AuthGuard>{App}</AuthGuard>} path="*" />
</Routes>
</Suspense>
<E2ETests />
</AppProviders>
Expand Down
21 changes: 21 additions & 0 deletions src/modules/components/header/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import styled from 'styled-components'
import { Flex } from '~/components/common/Flex'
import { Text } from '~/components/common/Text'

export const Header = () => (
<Head>
<Text className="title" color="white">
Graph Mindset
</Text>
</Head>
)

const Head = styled(Flex).attrs({
align: 'center',
direction: 'row',
grow: 1,
justify: 'flex-start',
})`
height: 64px;
padding: 20px 23px;
`
8 changes: 8 additions & 0 deletions src/modules/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Flex } from '~/components/common/Flex'
import { Header } from './components/header'

export const MindSet = () => (
<Flex>
<Header />
</Flex>
)

0 comments on commit 6273360

Please sign in to comment.