diff --git a/src/components/AppBar/AppBar.tsx b/src/components/AppBar/AppBar.tsx
index 084a8f0..39e23b7 100644
--- a/src/components/AppBar/AppBar.tsx
+++ b/src/components/AppBar/AppBar.tsx
@@ -28,6 +28,8 @@ import { faClose } from '@fortawesome/free-solid-svg-icons'
import useMediaQuery from '@mui/material/useMediaQuery'
import { useLogout } from '../../hooks/useLogout'
+import { launch as launchNostrLoginDialog } from 'nostr-login'
+
export const AppBar = () => {
const navigate = useNavigate()
const logout = useLogout()
@@ -128,7 +130,7 @@ export const AppBar = () => {
}
onClick={() => {
- navigate(appPublicRoutes.nostr)
+ launchNostrLoginDialog('welcome')
}}
variant="contained"
>
diff --git a/src/pages/landing/index.tsx b/src/pages/landing/index.tsx
index 2bee544..b28d3ce 100644
--- a/src/pages/landing/index.tsx
+++ b/src/pages/landing/index.tsx
@@ -1,7 +1,6 @@
import { Box, Button } from '@mui/material'
import { useEffect } from 'react'
-import { Outlet, useLocation, useNavigate } from 'react-router-dom'
-import { appPublicRoutes } from '../../routes'
+import { Outlet, useLocation } from 'react-router-dom'
import { saveVisitedLink } from '../../utils'
import { CardComponent } from '../../components/Landing/CardComponent/CardComponent'
import { Container } from '../../components/Container'
@@ -20,13 +19,13 @@ import {
} from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIconStack } from '../../components/FontAwesomeIconStack'
import { Footer } from '../../components/Footer/Footer'
+import { launch as launchNostrLoginDialog } from 'nostr-login'
export const LandingPage = () => {
- const navigate = useNavigate()
const location = useLocation()
const onSignInClick = async () => {
- navigate(appPublicRoutes.nostr)
+ launchNostrLoginDialog('welcome')
}
const cards = [
diff --git a/src/routes/index.tsx b/src/routes/index.tsx
index 603f1bd..97d66c3 100644
--- a/src/routes/index.tsx
+++ b/src/routes/index.tsx
@@ -1,11 +1,7 @@
-import { Modal } from '../layouts/modal'
import { CreatePage } from '../pages/create'
import { HomePage } from '../pages/home'
import { LandingPage } from '../pages/landing'
-import { Login } from '../pages/login'
-import { Nostr } from '../pages/nostr'
import { ProfilePage } from '../pages/profile'
-import { Register } from '../pages/register'
import { SettingsPage } from '../pages/settings/Settings'
import { CacheSettingsPage } from '../pages/settings/cache'
import { NostrLoginPage } from '../pages/settings/nostrLogin'
@@ -87,29 +83,7 @@ export const publicRoutes: PublicRouteProps[] = [
{
path: appPublicRoutes.landingPage,
hiddenWhenLoggedIn: true,
- element: ,
- children: [
- {
- element: ,
- children: [
- {
- path: appPublicRoutes.login,
- hiddenWhenLoggedIn: true,
- element:
- },
- {
- path: appPublicRoutes.register,
- hiddenWhenLoggedIn: true,
- element:
- },
- {
- path: appPublicRoutes.nostr,
- hiddenWhenLoggedIn: true,
- element:
- }
- ]
- }
- ]
+ element:
},
{
path: appPublicRoutes.profile,