Skip to content

Commit 60ad851

Browse files
committed
fix: loading class
Signed-off-by: Innei <[email protected]>
1 parent 62f314a commit 60ad851

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

src/app/notes/[id]/loading.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { Loading } from '~/components/ui/loading'
22

3-
export default () => <Loading useDefaultLoadingText className="my-12" />
3+
export default () => <Loading useDefaultLoadingText />

src/app/notes/[id]/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const PageImpl = () => {
3737
}, [note?.nid, note?.title, note?.topic?.name])
3838

3939
if (!note) {
40-
return <Loading useDefaultLoadingText className="my-12" />
40+
return <Loading useDefaultLoadingText />
4141
}
4242

4343
// const mardownResult = parseMarkdown(note.text ?? '')

src/app/notes/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default () => {
4040

4141
return (
4242
<Paper>
43-
<Loading useDefaultLoadingText className="mt-12" />
43+
<Loading useDefaultLoadingText />
4444
</Paper>
4545
)
4646
}

src/components/common/PageHolder.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FC } from 'react'
33

44
import { Loading } from '~/components/ui/loading'
55

6-
const LoadingComponent = () => <Loading className="mt-20" />
6+
const LoadingComponent = () => <Loading useDefaultLoadingText />
77
export const PageDataHolder = (
88
PageImpl: FC<any>,
99
useQuery: () => UseQueryResult<any>,

src/components/ui/loading/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const Loading: Component<LoadingProps> = ({
1818
: loadingText
1919
return (
2020
<div
21-
className={clsxm('flex flex-col items-center justify-start', className)}
21+
className={clsxm(
22+
'my-20 flex flex-col items-center justify-start',
23+
className,
24+
)}
2225
>
2326
<span className="loading loading-ball loading-lg" />
2427
{!!nextLoadingText && (

src/components/widgets/note/NoteTopicInfo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const InnerTopicDetail: FC<{ topic: TopicModel }> = (props) => {
7676

7777
<Divider />
7878
{isLoading ? (
79-
<Loading />
79+
<Loading className="my-4" />
8080
) : (
8181
data?.data[0] && (
8282
<p className="flex items-center">

0 commit comments

Comments
 (0)