diff --git a/next.config.mjs b/next.config.mjs index c4d8f61cc5..716e7e0299 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -46,7 +46,7 @@ let nextConfig = { sentryWebpackPlugin({ org: 'inneis-site', - project: 'Shiro', + project: 'springtide', authToken: process.env.SENTRY_AUTH_TOKEN, }), ) diff --git a/src/app/(note-topic)/notes/(topic-detail)/topics/[slug]/page.tsx b/src/app/(note-topic)/notes/(topic-detail)/topics/[slug]/page.tsx index fd704f65f8..2bd46bb483 100644 --- a/src/app/(note-topic)/notes/(topic-detail)/topics/[slug]/page.tsx +++ b/src/app/(note-topic)/notes/(topic-detail)/topics/[slug]/page.tsx @@ -8,6 +8,7 @@ import { TimelineList } from '~/components/ui/list/TimelineList' import { Loading } from '~/components/ui/loading' import { BottomToUpSoftScaleTransitionView } from '~/components/ui/transition/BottomToUpSoftScaleTransitionView' import { BottomToUpTransitionView } from '~/components/ui/transition/BottomToUpTransitionView' +import { LoadMoreIndicator } from '~/components/widgets/shared/LoadMoreIndicator' import { routeBuilder, Routes } from '~/lib/route-builder' import { apiClient } from '~/utils/request' @@ -23,6 +24,7 @@ export default function Page() { const { data: notes, isLoading, + hasNextPage, fetchNextPage, } = useInfiniteQuery({ queryKey: ['topicId', data?.id], @@ -64,7 +66,6 @@ export default function Page() { > } diff --git a/src/app/(note-topic)/notes/topics/page.tsx b/src/app/(note-topic)/notes/topics/page.tsx index 54ed6868f7..0d9a9bcda7 100644 --- a/src/app/(note-topic)/notes/topics/page.tsx +++ b/src/app/(note-topic)/notes/topics/page.tsx @@ -37,7 +37,6 @@ export default function Page() { > { @@ -42,7 +41,7 @@ const MemoedHeader = memo(() => { - + {/* */} diff --git a/src/components/layout/header/internal/AnimatedLogo.tsx b/src/components/layout/header/internal/AnimatedLogo.tsx index 0502fa36d3..60f18770ea 100644 --- a/src/components/layout/header/internal/AnimatedLogo.tsx +++ b/src/components/layout/header/internal/AnimatedLogo.tsx @@ -9,7 +9,7 @@ import { Routes } from '~/lib/route-builder' import { toast } from '~/lib/toast' import { useHeaderMetaShouldShow } from './hooks' -import { Logo } from './Logo' +import { SiteOwnerAvatar } from './SiteOwnerAvatar' const TapableLogo = () => { const router = useRouter() @@ -31,7 +31,12 @@ const TapableLogo = () => { ) }, ) - return + // return + return ( + + ) } export const AnimatedLogo = () => { const shouldShowMeta = useHeaderMetaShouldShow() @@ -47,7 +52,7 @@ export const AnimatedLogo = () => { initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} - className="scale-75" + // className="scale-75" > diff --git a/src/components/layout/header/internal/HeaderArea.tsx b/src/components/layout/header/internal/HeaderArea.tsx index 2fad494c25..e8d4c2e9a8 100644 --- a/src/components/layout/header/internal/HeaderArea.tsx +++ b/src/components/layout/header/internal/HeaderArea.tsx @@ -8,7 +8,11 @@ import styles from './grid.module.css' export const HeaderLogoArea: Component = ({ children }) => { return (
-
+
{children}
diff --git a/src/components/widgets/comment/Comments.tsx b/src/components/widgets/comment/Comments.tsx index 4255d70f8c..6c7125610e 100644 --- a/src/components/widgets/comment/Comments.tsx +++ b/src/components/widgets/comment/Comments.tsx @@ -2,14 +2,13 @@ import { useInfiniteQuery } from '@tanstack/react-query' import { memo, useMemo } from 'react' -import { useInView } from 'react-intersection-observer' import type { FC } from 'react' import type { CommentBaseProps } from './types' -import { Loading } from '~/components/ui/loading' import { BottomToUpSoftScaleTransitionView } from '~/components/ui/transition/BottomToUpSoftScaleTransitionView' import { apiClient } from '~/utils/request' +import { LoadMoreIndicator } from '../shared/LoadMoreIndicator' import { Comment } from './Comment' import { CommentBoxProvider } from './CommentBox/providers' import { CommentSkeleton } from './CommentSkeleton' @@ -76,19 +75,3 @@ const CommentListItem: FC<{ comment: any; refId: string; index: number }> = ) }) - -const LoadMoreIndicator: FC<{ - onClick: () => void -}> = ({ onClick }) => { - const { ref } = useInView({ - rootMargin: '1px', - onChange(inView) { - if (inView) onClick() - }, - }) - return ( -
- -
- ) -} diff --git a/src/components/widgets/shared/LoadMoreIndicator.tsx b/src/components/widgets/shared/LoadMoreIndicator.tsx new file mode 100644 index 0000000000..7b3cb24eb0 --- /dev/null +++ b/src/components/widgets/shared/LoadMoreIndicator.tsx @@ -0,0 +1,22 @@ +'use client' + +import { useInView } from 'react-intersection-observer' +import type { FC } from 'react' + +import { Loading } from '~/components/ui/loading' + +export const LoadMoreIndicator: FC<{ + onClick: () => void +}> = ({ onClick }) => { + const { ref } = useInView({ + rootMargin: '1px', + onChange(inView) { + if (inView) onClick() + }, + }) + return ( +
+ +
+ ) +}