Skip to content

Commit d3a531e

Browse files
committed
Merge branch 'zouhir-auth' into feat-streaks
2 parents cc38776 + bb81416 commit d3a531e

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/components/Layout/Header.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { UserTags } from 'src/components/Elements/UserTags'
1111
import { useAuth } from 'src/features/auth'
1212
import { Changelog } from 'src/features/changelog'
1313
import { identifyUserTheme, trackDNDDisable, trackThemeSelect } from 'src/lib/analytics'
14-
import { useBookmarks } from 'src/stores/bookmarks'
1514
import { useUserPreferences } from 'src/stores/preferences'
1615
import { Button, CircleButton } from '../Elements'
1716

@@ -20,7 +19,6 @@ export const Header = () => {
2019

2120
const [themeIcon, setThemeIcon] = useState(<BsMoonFill />)
2221
const { theme, setTheme, setDNDDuration, isDNDModeActive } = useUserPreferences()
23-
const { userBookmarks } = useBookmarks()
2422
const navigate = useNavigate()
2523
const location = useLocation()
2624

@@ -88,13 +86,13 @@ export const Header = () => {
8886
<CircleButton
8987
className="profileImageContainer"
9088
onClick={() => {
91-
if (isConnected()) {
89+
if (isConnected) {
9290
navigate('/settings/general')
9391
} else {
9492
openAuthModal()
9593
}
9694
}}>
97-
{isConnected() ? (
95+
{isConnected ? (
9896
<>
9997
<img className="profileImage s" src={user?.imageURL} />
10098
<div className="streak">

src/features/auth/hooks/useAuth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const useAuth = () => {
77
const authModalStore = AuthModalStore()
88
const authStore = AuthStore()
99

10-
const isConnected = () => authStore.user != null
10+
const isConnected = authStore.user != null
1111

1212
const logout = async () => {
1313
trackUserDisconnect()

0 commit comments

Comments
 (0)