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