+
+
+ {new Array(25).fill(null).map((_, i) => {
+ return (
+
0.5 ? 1 : 0,
+ }}
+ />
+ );
+ })}
+
+
+ );
+};
diff --git a/apps/trading/public/preloader.css b/apps/trading/public/preloader.css
deleted file mode 100644
index a3669b3f6..000000000
--- a/apps/trading/public/preloader.css
+++ /dev/null
@@ -1,116 +0,0 @@
-.pre-loader {
- display: flex;
- width: 100%;
- min-height: 100vh;
- justify-content: center;
- align-items: center;
-}
-.pre-loader .loader-item {
- width: 10px;
- height: 10px;
- background: #000;
-}
-.pre-loader .pre-loader-center {
- align-items: center;
- display: flex;
- flex-direction: column;
-}
-.pre-loader .pre-loader-wrapper {
- width: 50px;
- height: 50px;
- display: flex;
- flex-wrap: wrap;
-}
-@media (prefers-color-scheme: light) {
- .pre-loader .loader-item {
- background: #000;
- }
-}
-.pre-loader .loader-item:nth-child(0) {
- animation-delay: 0ms;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:first-child {
- animation-delay: -50ms;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(2) {
- animation-delay: 0.2s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(3) {
- animation-delay: -0.6s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(4) {
- animation-delay: 0.4s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(5) {
- animation-delay: -0.5s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(6) {
- animation-delay: 0.3s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(7) {
- animation-delay: -1.4s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(8) {
- animation-delay: 2s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(9) {
- animation-delay: -0.9s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(10) {
- animation-delay: 1.5s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(11) {
- animation-delay: -0.55s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(12) {
- animation-delay: 1.2s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(13) {
- animation-delay: -0.65s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(14) {
- animation-delay: 0.7s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item:nth-child(15) {
- animation-delay: -3.75s;
- animation-direction: alternate;
-}
-.pre-loader .loader-item:nth-child(16) {
- animation-delay: 1.6s;
- animation-direction: reverse;
-}
-.pre-loader .loader-item {
- animation: flickering 0.4s linear infinite alternate;
-}
-@keyframes flickering {
- 0% {
- opacity: 1;
- }
- 25% {
- opacity: 1;
- }
- 26% {
- opacity: 0;
- }
- to {
- opacity: 0;
- }
-}
-html.dark .pre-loader .loader-item {
- background: #fff;
-}
diff --git a/libs/environment/src/components/app-failure/app-failure.tsx b/libs/environment/src/components/app-failure/app-failure.tsx
index 7afb9e4c3..771c778ea 100644
--- a/libs/environment/src/components/app-failure/app-failure.tsx
+++ b/libs/environment/src/components/app-failure/app-failure.tsx
@@ -1,5 +1,5 @@
import { t } from '@vegaprotocol/i18n';
-import { Button } from '@vegaprotocol/ui-toolkit';
+import { Button, Splash } from '@vegaprotocol/ui-toolkit';
import { useNodeSwitcherStore } from '../../hooks/use-node-switcher-store';
export const AppFailure = ({
@@ -10,17 +10,15 @@ export const AppFailure = ({
error?: string | null;
}) => {
const setNodeSwitcher = useNodeSwitcherStore((store) => store.setDialogOpen);
- const nonIdealWrapperClasses =
- 'h-full min-h-screen flex items-center justify-center';
return (
-
+
-
{title}
- {error &&
{error}
}
+
{title}
+ {error &&
{error}
}
-
+
);
};
diff --git a/libs/environment/src/components/app-loader/app-loader.tsx b/libs/environment/src/components/app-loader/app-loader.tsx
new file mode 100644
index 000000000..afe4e4f16
--- /dev/null
+++ b/libs/environment/src/components/app-loader/app-loader.tsx
@@ -0,0 +1,9 @@
+import { Loader, Splash } from '@vegaprotocol/ui-toolkit';
+
+export const AppLoader = () => {
+ return (
+
+
+
+ );
+};
diff --git a/libs/environment/src/components/app-loader/index.ts b/libs/environment/src/components/app-loader/index.ts
new file mode 100644
index 000000000..a8e600010
--- /dev/null
+++ b/libs/environment/src/components/app-loader/index.ts
@@ -0,0 +1 @@
+export { AppLoader } from './app-loader';
diff --git a/libs/environment/src/components/index.ts b/libs/environment/src/components/index.ts
index 91dcd6e7e..727d02351 100644
--- a/libs/environment/src/components/index.ts
+++ b/libs/environment/src/components/index.ts
@@ -1,4 +1,5 @@
export * from './app-failure';
+export * from './app-loader';
export * from './network-loader';
export * from './network-switcher';
export * from './node-guard';
diff --git a/libs/ui-toolkit/src/components/loader/loader.tsx b/libs/ui-toolkit/src/components/loader/loader.tsx
index 045e1338c..1a591708b 100644
--- a/libs/ui-toolkit/src/components/loader/loader.tsx
+++ b/libs/ui-toolkit/src/components/loader/loader.tsx
@@ -30,11 +30,8 @@ export const Loader = ({ size = 'large', forceTheme }: LoaderProps) => {
const generate = useMemo(() => pseudoRandom(1), []);
return (
-
-
+
+
{new Array(items).fill(null).map((_, i) => {
return (