navbar fixes
This commit is contained in:
parent
6354913420
commit
236ee552c6
|
@ -37,7 +37,6 @@ export default function Header ({ sub }) {
|
|||
useEffect(() => {
|
||||
// there's always at least 2 on the split, e.g. '/' yields ['','']
|
||||
const path = router.asPath.split('?')[0]
|
||||
console.log(path, path.split('/')[sub ? 2 : 1], path.split('/').slice(sub ? 2 : 1).join('/'))
|
||||
setPrefix(sub ? `/~${sub}` : '')
|
||||
setTopNavKey(path.split('/')[sub ? 2 : 1] ?? '')
|
||||
setDropNavKey(path.split('/').slice(sub ? 2 : 1).join('/'))
|
||||
|
@ -69,7 +68,7 @@ export default function Header ({ sub }) {
|
|||
const Corner = () => {
|
||||
if (me) {
|
||||
return (
|
||||
<div className='d-flex align-items-center'>
|
||||
<div className='d-flex align-items-center ml-auto'>
|
||||
<Head>
|
||||
<link rel='shortcut icon' href={hasNewNotes?.hasNewNotes ? '/favicon-notify.png' : '/favicon.png'} />
|
||||
</Head>
|
||||
|
@ -152,7 +151,7 @@ export default function Header ({ sub }) {
|
|||
}, [])
|
||||
}
|
||||
return path !== '/login' && path !== '/signup' && !path.startsWith('/invites') &&
|
||||
<div>
|
||||
<div className='ml-auto'>
|
||||
<Button
|
||||
className='align-items-center px-3 py-1 mr-2'
|
||||
id='signup'
|
||||
|
@ -268,7 +267,7 @@ export default function Header ({ sub }) {
|
|||
<SearchIcon className='theme' width={22} height={22} />
|
||||
</Nav.Link>
|
||||
</Link>
|
||||
<Nav.Item className={`${styles.price} mx-auto align-items-center ${me?.name.length > 10 ? 'd-none d-lg-flex' : ''}`}>
|
||||
<Nav.Item className={`${styles.price} ml-auto align-items-center ${me?.name.length > 10 ? 'd-none d-lg-flex' : ''}`}>
|
||||
<Price className='nav-link text-monospace' />
|
||||
</Nav.Item>
|
||||
<Corner />
|
||||
|
|
|
@ -31,7 +31,7 @@ function QrAuth ({ k1, encodedUrl, slashtagUrl, callbackUrl }) {
|
|||
function LightningExplainer ({ text, children }) {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<Container sm>
|
||||
<Container>
|
||||
<div className={styles.login}>
|
||||
<div className='w-100 mb-3 text-muted pointer' onClick={() => router.back()}><BackIcon /></div>
|
||||
<h3 className='w-100 pb-2'>
|
||||
|
|
|
@ -84,7 +84,7 @@ export default function Login ({ providers, callbackUrl, error, text, Header, Fo
|
|||
type={provider.name.toLowerCase()}
|
||||
onClick={() => router.push({
|
||||
pathname: router.pathname,
|
||||
query: { ...router.query, type: provider.name.toLowerCase() }
|
||||
query: { callbackUrl: router.query.callbackUrl, type: provider.name.toLowerCase() }
|
||||
})}
|
||||
text={`${text || 'Login'} with`}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue