Skip to content

Commit

Permalink
fix: loading class
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Jun 16, 2023
1 parent 62f314a commit 60ad851
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/notes/[id]/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { Loading } from '~/components/ui/loading'

export default () => <Loading useDefaultLoadingText className="my-12" />
export default () => <Loading useDefaultLoadingText />
2 changes: 1 addition & 1 deletion src/app/notes/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const PageImpl = () => {
}, [note?.nid, note?.title, note?.topic?.name])

if (!note) {
return <Loading useDefaultLoadingText className="my-12" />
return <Loading useDefaultLoadingText />
}

// const mardownResult = parseMarkdown(note.text ?? '')
Expand Down
2 changes: 1 addition & 1 deletion src/app/notes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default () => {

return (
<Paper>
<Loading useDefaultLoadingText className="mt-12" />
<Loading useDefaultLoadingText />
</Paper>
)
}
2 changes: 1 addition & 1 deletion src/components/common/PageHolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FC } from 'react'

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

const LoadingComponent = () => <Loading className="mt-20" />
const LoadingComponent = () => <Loading useDefaultLoadingText />
export const PageDataHolder = (
PageImpl: FC<any>,
useQuery: () => UseQueryResult<any>,
Expand Down
5 changes: 4 additions & 1 deletion src/components/ui/loading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export const Loading: Component<LoadingProps> = ({
: loadingText
return (
<div
className={clsxm('flex flex-col items-center justify-start', className)}
className={clsxm(
'my-20 flex flex-col items-center justify-start',
className,
)}
>
<span className="loading loading-ball loading-lg" />
{!!nextLoadingText && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/note/NoteTopicInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const InnerTopicDetail: FC<{ topic: TopicModel }> = (props) => {

<Divider />
{isLoading ? (
<Loading />
<Loading className="my-4" />
) : (
data?.data[0] && (
<p className="flex items-center">
Expand Down

1 comment on commit 60ad851

@vercel
Copy link

@vercel vercel bot commented on 60ad851 Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

springtide – ./

springtide-git-main-innei.vercel.app
springtide-innei.vercel.app
springtide.vercel.app

Please sign in to comment.