@prismetic/next-preview-core 1.0.11 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismetic/next-preview-core",
3
- "version": "1.0.11",
3
+ "version": "1.0.14",
4
4
  "description": "Hybrid static/preview architecture for Next.js + Strapi projects",
5
5
  "author": "Prismetic Group FZ LLC",
6
6
  "main": "./dist/index.js",
@@ -38,14 +38,35 @@ export function withLivePreview<P extends object>(
38
38
 
39
39
  if (isLoading) {
40
40
  return (
41
- <div style={{ minHeight: "100vh", display: "flex", alignItems: "center", justifyContent: "center" }}>
41
+ <div
42
+ style={{
43
+ minHeight: "100vh",
44
+ display: "flex",
45
+ alignItems: "center",
46
+ justifyContent: "center",
47
+ }}
48
+ >
42
49
  Loading preview...
43
50
  </div>
44
51
  );
45
52
  }
46
53
 
47
54
  if (!data) {
48
- return <div>Page not found</div>;
55
+ return (
56
+ <div
57
+ style={{
58
+ position: "fixed",
59
+ height: "100vh",
60
+ background: "white",
61
+ zIndex: 10000,
62
+ width: "100%",
63
+ display: "grid",
64
+ placeContent: "center",
65
+ }}
66
+ >
67
+ Page not found
68
+ </div>
69
+ );
49
70
  }
50
71
 
51
72
  // Props spread first, then fetched data takes priority