Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
6b0ad7e3
Commit
6b0ad7e3
authored
Oct 14, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the loading state for menu loading
parent
9a35d2d7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
1 deletions
+80
-1
loading.tsx
src/app/(dashboard)/(admin)/menus/loading.tsx
+14
-0
loading.tsx
src/app/(dashboard)/(admin)/settings/loading.tsx
+14
-0
loading.tsx
src/app/(dashboard)/(user)/(outsideAuth)/loading.tsx
+14
-0
index.tsx
src/components/pages/menus/index.tsx
+38
-1
No files found.
src/app/(dashboard)/(admin)/menus/loading.tsx
0 → 100644
View file @
6b0ad7e3
// components/Loading.tsx
import
React
from
'react'
;
export
default
function
Loading
()
{
return
(
<
div
className=
"flex items-center justify-center h-[60vh]"
>
<
div
className=
"flex flex-col items-center"
>
{
/* Spinner */
}
<
div
className=
"w-12 h-12 border-4 border-gray-200 border-t-primary rounded-full animate-spin"
></
div
>
<
p
className=
"mt-4 text-gray-600 font-medium text-lg"
>
Loading...
</
p
>
</
div
>
</
div
>
);
}
src/app/(dashboard)/(admin)/settings/loading.tsx
0 → 100644
View file @
6b0ad7e3
// components/Loading.tsx
import
React
from
'react'
;
export
default
function
Loading
()
{
return
(
<
div
className=
"flex items-center justify-center h-[60vh]"
>
<
div
className=
"flex flex-col items-center"
>
{
/* Spinner */
}
<
div
className=
"w-12 h-12 border-4 border-gray-200 border-t-primary rounded-full animate-spin"
></
div
>
<
p
className=
"mt-4 text-gray-600 font-medium text-lg"
>
Loading...
</
p
>
</
div
>
</
div
>
);
}
src/app/(dashboard)/(user)/(outsideAuth)/loading.tsx
0 → 100644
View file @
6b0ad7e3
// components/Loading.tsx
import
React
from
'react'
;
export
default
function
Loading
()
{
return
(
<
div
className=
"flex items-center justify-center h-[60vh]"
>
<
div
className=
"flex flex-col items-center"
>
{
/* Spinner */
}
<
div
className=
"w-12 h-12 border-4 border-gray-200 border-t-primary rounded-full animate-spin"
></
div
>
<
p
className=
"mt-4 text-gray-600 font-medium text-lg"
>
Loading...
</
p
>
</
div
>
</
div
>
);
}
src/components/pages/menus/index.tsx
View file @
6b0ad7e3
...
...
@@ -55,8 +55,45 @@ export default function MenuPage() {
}
};
// Shimmer loader component for MenuPage
function
MenuPageLoading
()
{
return
(
<
div
className=
"flex flex-col md:grid md:grid-cols-12 gap-8"
>
{
/* LEFT SIDE - PAGES LIST */
}
<
div
className=
"col-span-4 border border-gray-300 rounded-xl p-4"
>
<
h2
className=
"text-lg font-semibold mb-3"
>
All Pages
</
h2
>
<
div
className=
"flex flex-col gap-2 max-h-[500px] overflow-y-auto"
>
{
Array
.
from
({
length
:
5
}).
map
((
_
,
idx
)
=>
(
<
div
key=
{
idx
}
className=
"h-8 bg-gray-200 rounded-lg animate-pulse"
></
div
>
))
}
</
div
>
</
div
>
{
/* RIGHT SIDE - SELECTED MENU */
}
<
div
className=
"col-span-8 border border-gray-300 rounded-xl p-4"
>
<
h2
className=
"text-lg font-semibold mb-3"
>
Selected Menu
</
h2
>
<
div
className=
"space-y-3"
>
{
Array
.
from
({
length
:
3
}).
map
((
_
,
idx
)
=>
(
<
div
key=
{
idx
}
className=
"h-10 bg-gray-200 rounded-lg animate-pulse w-full"
></
div
>
))
}
</
div
>
<
div
className=
"text-end mt-4"
>
<
div
className=
"h-10 w-32 bg-gray-200 rounded-lg animate-pulse ml-auto"
></
div
>
</
div
>
</
div
>
</
div
>
);
}
if
(
isLoading
)
{
return
<
div
className=
"text-center py-10"
>
Loading pages...
</
div
>;
return
<
MenuPageLoading
/
>;
}
const
pages
=
data
?.
data
?.
data
||
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment