Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New loading before rendering #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/calypsso/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.2"
__version__ = "1.1.4"
21 changes: 21 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,24 @@
box-shadow: inset -20px 20px rgba(0, 0, 0, 0.2);
}
}

.skeleton {
animation: loading_for_skeleton 1s linear infinite alternate;
width: 100%;
height: 40px;
border-radius: 0.5rem;
}

@keyframes loading_for_skeleton {
0% {
background-color: hsl(200, 20%, 80%);
}
100% {
background-color: hsl(200, 20%, 95%);
}
}

.skeleton-formlabel {
width: 10%;
height: 20px;
}
18 changes: 16 additions & 2 deletions src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ const Login = () => {
}/auth/authorization-flow/authorize-validation`}
>
<div className="grid gap-4">
<Suspense>
<Suspense
fallback={
<>
<div className="skeleton skeleton-formlabel"></div>
<div className="skeleton"></div>
</>
}
>
<LoginCustomFormField
form={form}
name="email"
Expand All @@ -65,7 +72,14 @@ const Login = () => {
)}
/>
</Suspense>
<Suspense>
<Suspense
fallback={
<>
<div className="skeleton skeleton-formlabel"></div>
<div className="skeleton"></div>
</>
}
>
<LoginCustomFormField
form={form}
name="password"
Expand Down
2 changes: 1 addition & 1 deletion src/components/custom/SuspenseEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ interface SuspenseEmbedProps {
}

export const SuspenseEmbed = ({ children }: SuspenseEmbedProps) => {
return <Suspense fallback={<div>Loading...</div>}>{children}</Suspense>;
return <Suspense fallback={<></>}>{children}</Suspense>;
};