diff --git a/package.json b/package.json index e53e626b4..5d7304fbd 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@hono/auth-js": "1.0.4", "@radix-ui/react-avatar": "1.0.4", "@radix-ui/react-collapsible": "1.0.3", + "@radix-ui/react-dialog": "1.0.5", "@radix-ui/react-slot": "1.0.2", "@radix-ui/react-tabs": "1.0.4", "@radix-ui/react-tooltip": "1.0.7", @@ -46,6 +47,7 @@ "framer-motion": "11.1.7", "hast-util-to-jsx-runtime": "2.3.0", "lethargy": "1.0.9", + "lucide-react": "0.376.0", "react-router-dom": "6.23.0", "rehype-infer-description-meta": "2.0.0", "rehype-parse": "9.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 476f476bd..bd9b30b86 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: '@radix-ui/react-collapsible': specifier: 1.0.3 version: 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-dialog': + specifier: 1.0.5 + version: 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) '@radix-ui/react-slot': specifier: 1.0.2 version: 1.0.2(@types/react@18.3.0)(react@18.3.0) @@ -71,6 +74,9 @@ importers: lethargy: specifier: 1.0.9 version: 1.0.9 + lucide-react: + specifier: 0.376.0 + version: 0.376.0(react@18.3.0) react-router-dom: specifier: 6.23.0 version: 6.23.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0) @@ -882,6 +888,19 @@ packages: '@types/react': optional: true + '@radix-ui/react-dialog@1.0.5': + resolution: {integrity: sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-direction@1.0.1': resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} peerDependencies: @@ -904,6 +923,28 @@ packages: '@types/react-dom': optional: true + '@radix-ui/react-focus-guards@1.0.1': + resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-focus-scope@1.0.4': + resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-id@1.0.1': resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} peerDependencies: @@ -1470,6 +1511,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-hidden@1.2.4: + resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==} + engines: {node: '>=10'} + array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} @@ -1886,6 +1931,9 @@ packages: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} + detect-node-es@1.1.0: + resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} @@ -2289,6 +2337,10 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-nonce@1.0.1: + resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} + engines: {node: '>=6'} + get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -2528,6 +2580,9 @@ packages: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} + invariant@2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + ip-address@9.0.5: resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} engines: {node: '>= 12'} @@ -2884,6 +2939,11 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} + lucide-react@0.376.0: + resolution: {integrity: sha512-g91IX3ERD6yUR1TL2dsL4BkcGygpZz/EsqjAeL/kcRQV0EApIOr/9eBfKhYOVyQIcGGuotFGjF3xKLHMEz+b7g==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 + magic-string@0.30.10: resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} @@ -3417,6 +3477,26 @@ packages: resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} engines: {node: '>=0.10.0'} + react-remove-scroll-bar@2.3.6: + resolution: {integrity: sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + react-remove-scroll@2.5.5: + resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + react-router-dom@6.23.0: resolution: {integrity: sha512-Q9YaSYvubwgbal2c9DJKfx6hTNoBp3iJDsl+Duva/DwxoJH+OTXkxGpql4iUK2sla/8z4RpjAm6EWx1qUDuopQ==} engines: {node: '>=14.0.0'} @@ -3430,6 +3510,16 @@ packages: peerDependencies: react: '>=16.8' + react-style-singleton@2.2.1: + resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + react@18.3.0: resolution: {integrity: sha512-RPutkJftSAldDibyrjuku7q11d3oy6wKOyPe5K1HA/HwwrXcEqBdHsLypkC2FFYjP7bPUa6gbzSBhw4sY2JcDg==} engines: {node: '>=0.10.0'} @@ -3916,6 +4006,26 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + use-callback-ref@1.3.2: + resolution: {integrity: sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + use-sidecar@1.1.2: + resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} + engines: {node: '>=10'} + peerDependencies: + '@types/react': ^16.9.0 || ^17.0.0 || ^18.0.0 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + utf8-byte-length@1.0.4: resolution: {integrity: sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==} @@ -4726,6 +4836,29 @@ snapshots: optionalDependencies: '@types/react': 18.3.0 + '@radix-ui/react-dialog@1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0)': + dependencies: + '@babel/runtime': 7.24.4 + '@radix-ui/primitive': 1.0.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.3.0)(react@18.3.0) + aria-hidden: 1.2.4 + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) + react-remove-scroll: 2.5.5(@types/react@18.3.0)(react@18.3.0) + optionalDependencies: + '@types/react': 18.3.0 + '@types/react-dom': 18.3.0 + '@radix-ui/react-direction@1.0.1(@types/react@18.3.0)(react@18.3.0)': dependencies: '@babel/runtime': 7.24.4 @@ -4747,6 +4880,25 @@ snapshots: '@types/react': 18.3.0 '@types/react-dom': 18.3.0 + '@radix-ui/react-focus-guards@1.0.1(@types/react@18.3.0)(react@18.3.0)': + dependencies: + '@babel/runtime': 7.24.4 + react: 18.3.0 + optionalDependencies: + '@types/react': 18.3.0 + + '@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0)': + dependencies: + '@babel/runtime': 7.24.4 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.0)(react@18.3.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.0)(react-dom@18.3.0(react@18.3.0))(react@18.3.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.0)(react@18.3.0) + react: 18.3.0 + react-dom: 18.3.0(react@18.3.0) + optionalDependencies: + '@types/react': 18.3.0 + '@types/react-dom': 18.3.0 + '@radix-ui/react-id@1.0.1(@types/react@18.3.0)(react@18.3.0)': dependencies: '@babel/runtime': 7.24.4 @@ -5402,6 +5554,10 @@ snapshots: argparse@2.0.1: {} + aria-hidden@1.2.4: + dependencies: + tslib: 2.6.2 + array-buffer-byte-length@1.0.1: dependencies: call-bind: 1.0.7 @@ -5880,6 +6036,8 @@ snapshots: detect-libc@2.0.3: {} + detect-node-es@1.1.0: {} + detect-node@2.1.0: optional: true @@ -6502,6 +6660,8 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-nonce@1.0.1: {} + get-stream@5.2.0: dependencies: pump: 3.0.0 @@ -6854,6 +7014,10 @@ snapshots: hasown: 2.0.2 side-channel: 1.0.6 + invariant@2.2.4: + dependencies: + loose-envify: 1.4.0 + ip-address@9.0.5: dependencies: jsbn: 1.1.0 @@ -7178,6 +7342,10 @@ snapshots: lru-cache@7.18.3: {} + lucide-react@0.376.0(react@18.3.0): + dependencies: + react: 18.3.0 + magic-string@0.30.10: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -7843,6 +8011,25 @@ snapshots: react-refresh@0.14.0: {} + react-remove-scroll-bar@2.3.6(@types/react@18.3.0)(react@18.3.0): + dependencies: + react: 18.3.0 + react-style-singleton: 2.2.1(@types/react@18.3.0)(react@18.3.0) + tslib: 2.6.2 + optionalDependencies: + '@types/react': 18.3.0 + + react-remove-scroll@2.5.5(@types/react@18.3.0)(react@18.3.0): + dependencies: + react: 18.3.0 + react-remove-scroll-bar: 2.3.6(@types/react@18.3.0)(react@18.3.0) + react-style-singleton: 2.2.1(@types/react@18.3.0)(react@18.3.0) + tslib: 2.6.2 + use-callback-ref: 1.3.2(@types/react@18.3.0)(react@18.3.0) + use-sidecar: 1.1.2(@types/react@18.3.0)(react@18.3.0) + optionalDependencies: + '@types/react': 18.3.0 + react-router-dom@6.23.0(react-dom@18.3.0(react@18.3.0))(react@18.3.0): dependencies: '@remix-run/router': 1.16.0 @@ -7855,6 +8042,15 @@ snapshots: '@remix-run/router': 1.16.0 react: 18.3.0 + react-style-singleton@2.2.1(@types/react@18.3.0)(react@18.3.0): + dependencies: + get-nonce: 1.0.1 + invariant: 2.2.4 + react: 18.3.0 + tslib: 2.6.2 + optionalDependencies: + '@types/react': 18.3.0 + react@18.3.0: dependencies: loose-envify: 1.4.0 @@ -8492,6 +8688,21 @@ snapshots: dependencies: punycode: 2.3.1 + use-callback-ref@1.3.2(@types/react@18.3.0)(react@18.3.0): + dependencies: + react: 18.3.0 + tslib: 2.6.2 + optionalDependencies: + '@types/react': 18.3.0 + + use-sidecar@1.1.2(@types/react@18.3.0)(react@18.3.0): + dependencies: + detect-node-es: 1.1.0 + react: 18.3.0 + tslib: 2.6.2 + optionalDependencies: + '@types/react': 18.3.0 + utf8-byte-length@1.0.4: {} util-deprecate@1.0.2: {} diff --git a/src/renderer/src/components/feed-column/index.tsx b/src/renderer/src/components/feed-column/index.tsx index 9140b1197..a2d8c35ad 100644 --- a/src/renderer/src/components/feed-column/index.tsx +++ b/src/renderer/src/components/feed-column/index.tsx @@ -13,6 +13,8 @@ import { FeedList } from "./list" import { ActivedList } from "@renderer/lib/types" import { UserButton } from "@renderer/components/user-button" import { views } from "@renderer/lib/constants" +import { Dialog, DialogTrigger } from "@renderer/components/ui/dialog" +import { SubscribeDialog } from "./subscribe-dialog" const lethargy = new Lethargy() @@ -60,7 +62,7 @@ export function FeedColumn({ return (
setActivedList({ level: "view", @@ -70,8 +72,19 @@ export function FeedColumn({ }) } > - -
+
+
ReadOK
+
+ + + + + + + +
+
+
{views.map((item, index) => (
- {item.icon} + + {item.icon} + {item.name}
diff --git a/src/renderer/src/components/feed-column/list.tsx b/src/renderer/src/components/feed-column/list.tsx index 3d4f30abc..32bc21e7f 100644 --- a/src/renderer/src/components/feed-column/list.tsx +++ b/src/renderer/src/components/feed-column/list.tsx @@ -26,7 +26,7 @@ export function FeedList({
{ e.stopPropagation() diff --git a/src/renderer/src/components/feed-column/subscribe-dialog.tsx b/src/renderer/src/components/feed-column/subscribe-dialog.tsx new file mode 100644 index 000000000..bd7301ec0 --- /dev/null +++ b/src/renderer/src/components/feed-column/subscribe-dialog.tsx @@ -0,0 +1,17 @@ +import { + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "@renderer/components/ui/dialog" + +export function SubscribeDialog() { + return ( + + + Subscribe + description + + + ) +} diff --git a/src/renderer/src/components/ui/dialog.tsx b/src/renderer/src/components/ui/dialog.tsx new file mode 100644 index 000000000..4a076099b --- /dev/null +++ b/src/renderer/src/components/ui/dialog.tsx @@ -0,0 +1,120 @@ +import * as React from "react" +import * as DialogPrimitive from "@radix-ui/react-dialog" +import { X } from "lucide-react" + +import { cn } from "@renderer/lib/utils" + +const Dialog = DialogPrimitive.Root + +const DialogTrigger = DialogPrimitive.Trigger + +const DialogPortal = DialogPrimitive.Portal + +const DialogClose = DialogPrimitive.Close + +const DialogOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName + +const DialogContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + + {children} + + + Close + + + +)) +DialogContent.displayName = DialogPrimitive.Content.displayName + +const DialogHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +DialogHeader.displayName = "DialogHeader" + +const DialogFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +DialogFooter.displayName = "DialogFooter" + +const DialogTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogTitle.displayName = DialogPrimitive.Title.displayName + +const DialogDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +DialogDescription.displayName = DialogPrimitive.Description.displayName + +export { + Dialog, + DialogPortal, + DialogOverlay, + DialogClose, + DialogTrigger, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, +} diff --git a/src/renderer/src/components/user-button.tsx b/src/renderer/src/components/user-button.tsx index 341dc6639..7aa6e4927 100644 --- a/src/renderer/src/components/user-button.tsx +++ b/src/renderer/src/components/user-button.tsx @@ -6,7 +6,13 @@ import { import { useSession } from "@hono/auth-js/react" import { cn } from "@renderer/lib/utils" -export function UserButton({ className }: { className?: string }) { +export function UserButton({ + className, + hideName, +}: { + className?: string + hideName?: boolean +}) { const { data: session, status } = useSession() if (status !== "authenticated") { @@ -29,7 +35,7 @@ export function UserButton({ className }: { className?: string }) { {session?.user?.name?.slice(0, 2)} -
{session?.user?.name}
+ {!hideName &&
{session?.user?.name}
}
) }