From 89ec0324b806e2cd9eabcd8a625473edc5c1f679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Alexander=20Str=C3=B8mseng?= Date: Tue, 30 Apr 2024 17:05:53 +0200 Subject: [PATCH] 391 fix skeleton loading (#396) * delete all loading except root * add a loading animation * remove wrong comment * remove dev await timeout --- .../src/app/blog/[articleSlug]/loading.tsx | 15 ------ frontend/src/app/blog/loading.tsx | 26 --------- frontend/src/app/loading.module.css | 12 +++++ frontend/src/app/loading.tsx | 54 +++++++------------ .../app/projects/[projectSlug]/loading.tsx | 13 ----- .../satellites/[satelliteSlug]/loading.tsx | 13 ----- frontend/src/app/satellites/loading.tsx | 23 -------- 7 files changed, 31 insertions(+), 125 deletions(-) delete mode 100644 frontend/src/app/blog/[articleSlug]/loading.tsx delete mode 100644 frontend/src/app/blog/loading.tsx create mode 100644 frontend/src/app/loading.module.css delete mode 100644 frontend/src/app/projects/[projectSlug]/loading.tsx delete mode 100644 frontend/src/app/satellites/[satelliteSlug]/loading.tsx delete mode 100644 frontend/src/app/satellites/loading.tsx diff --git a/frontend/src/app/blog/[articleSlug]/loading.tsx b/frontend/src/app/blog/[articleSlug]/loading.tsx deleted file mode 100644 index 0ccf7c1..0000000 --- a/frontend/src/app/blog/[articleSlug]/loading.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { Skeleton } from "@shadcn/skeleton"; -import React from "react"; - -export default function Loading() { - return ( -
-
- - - - -
-
- ); -} diff --git a/frontend/src/app/blog/loading.tsx b/frontend/src/app/blog/loading.tsx deleted file mode 100644 index 0ecdef9..0000000 --- a/frontend/src/app/blog/loading.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { Skeleton } from "@shadcn/skeleton"; -import React from "react"; - -export default function Loading() { - return ( -
- {/* Full width div, split into three equal portions */} -
- -
- - - -
-
- - - - - - -
-
-
- ); -} diff --git a/frontend/src/app/loading.module.css b/frontend/src/app/loading.module.css new file mode 100644 index 0000000..fbf6535 --- /dev/null +++ b/frontend/src/app/loading.module.css @@ -0,0 +1,12 @@ +#small { + transform-origin: 50px 50px; + animation: moveAround 4s infinite linear; +} +@keyframes moveAround { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/frontend/src/app/loading.tsx b/frontend/src/app/loading.tsx index ee0128c..6c732ad 100644 --- a/frontend/src/app/loading.tsx +++ b/frontend/src/app/loading.tsx @@ -1,42 +1,26 @@ -import { - Skeleton, - SkeletonHero, - SkeletonSection, - EmptySection, -} from "@shadcn/skeleton"; import React from "react"; +import styles from "./loading.module.css"; export default function Loading() { return ( -
- {/* Full width div, split into two equal portions */} -
- {/* Square */} -
- -
- - -
-
- - -
-
- - -
- - -
-
- {/* Circle */} - -
-
- - - +
+ + + + + +
); } diff --git a/frontend/src/app/projects/[projectSlug]/loading.tsx b/frontend/src/app/projects/[projectSlug]/loading.tsx deleted file mode 100644 index 88f1dfd..0000000 --- a/frontend/src/app/projects/[projectSlug]/loading.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; - -// Assuming the correct import path for the Skeleton component -import { Skeleton } from "@shadcn/skeleton"; - -export default function Loading() { - return ( -
- - -
- ); -} diff --git a/frontend/src/app/satellites/[satelliteSlug]/loading.tsx b/frontend/src/app/satellites/[satelliteSlug]/loading.tsx deleted file mode 100644 index a9a09ca..0000000 --- a/frontend/src/app/satellites/[satelliteSlug]/loading.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; - -import { Skeleton } from "@shadcn/skeleton"; - -export default function Loading() { - return ( -
- - - -
- ); -} diff --git a/frontend/src/app/satellites/loading.tsx b/frontend/src/app/satellites/loading.tsx deleted file mode 100644 index 3ed65d0..0000000 --- a/frontend/src/app/satellites/loading.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Skeleton } from "@shadcn/skeleton"; -import React from "react"; - -export default function Loading() { - return ( -
- {/* Full width div, split into three equal portions */} -
-
- - - - - - - - - -
-
-
- ); -}