- {loadingState === 'loading' &&
-
-
-
}
- {loadingState === 'failed' &&
-
-
-
}
- {(loadingState === 'loading' || loadingState === 'loaded') &&
-

{
- if (onLoad) {
- onLoad();
- } else {
- setLoadingStateInternal('loaded');
- }
- }}
- onError={() => {
- if (onFail) {
- onFail();
- } else {
- setLoadingStateInternal('failed');
- }
- if (retryTime !== undefined) {
- setTimeout(() => {
- setLoadingStateInternal('loading');
- }, retryTime);
- }
- }}
- />}
-
-
+ {loadingState === 'loading' &&
+
+
+
}
+ {loadingState === 'failed' &&
+
+
+
}
+ {(loadingState === 'loading' || loadingState === 'loaded') &&
+

{
+ if (onLoad) {
+ onLoad();
+ } else {
+ setLoadingStateInternal('loaded');
+ }
+ }}
+ onError={() => {
+ if (onFail) {
+ onFail();
+ } else {
+ setLoadingStateInternal('failed');
+ }
+ if (retryTime !== undefined) {
+ setTimeout(() => {
+ setLoadingStateInternal('loading');
+ }, retryTime);
+ }
+ }}
+ />}
+
+ );
+};
diff --git a/src/components/og/OGTile.tsx b/src/components/og/OGTile.tsx
new file mode 100644
index 00000000..47c33554
--- /dev/null
+++ b/src/components/og/OGTile.tsx
@@ -0,0 +1,57 @@
+'use client';
+
+import { ComponentProps, useRef } from 'react';
+import { clsx } from 'clsx/lite';
+import Link from 'next/link';
+import useVisible from '@/utility/useVisible';
+import OGLoaderImage from './OGLoaderImage';
+
+export type OGLoadingState = 'unloaded' | 'loading' | 'loaded' | 'failed';
+
+export default function OGTile({
+ path,
+ pathImage,
+ description,
+ riseOnHover,
+ onVisible,
+ ...props
+}: {
+ description: string
+ pathImage: string
+ riseOnHover?: boolean
+ onVisible?: () => void
+} & ComponentProps