Spaces:
Sleeping
Sleeping
add hardware info
Browse files- app/page.tsx +0 -2
- components/space/sub/header.tsx +5 -2
- utils/types.ts +3 -0
app/page.tsx
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
import Image from "next/image";
|
2 |
-
import { Shuffle } from "lucide-react";
|
3 |
|
4 |
import CardsSvg from "@/images/cards.svg";
|
5 |
-
import { Space } from "@/components/space";
|
6 |
import { fetchSpaceRandomly } from "@/utils/network";
|
7 |
import { Shuffler } from "@/components/shuffler";
|
8 |
|
|
|
1 |
import Image from "next/image";
|
|
|
2 |
|
3 |
import CardsSvg from "@/images/cards.svg";
|
|
|
4 |
import { fetchSpaceRandomly } from "@/utils/network";
|
5 |
import { Shuffler } from "@/components/shuffler";
|
6 |
|
components/space/sub/header.tsx
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { Heart } from "lucide-react";
|
2 |
|
3 |
import { Space } from "@/utils/types";
|
4 |
|
@@ -12,7 +12,10 @@ export const SpaceHeader = ({ space }: { space: Space }) => {
|
|
12 |
className={`bg-gradient-to-br ${space.colorFrom} ${space.colorTo} -z-[1] blur-lg opacity-50 h-full w-full absolute top-0 left-0`}
|
13 |
/>
|
14 |
<div className="flex items-center justify-between w-full relative">
|
15 |
-
<
|
|
|
|
|
|
|
16 |
<p className="flex items-center justify-end gap-1 text-sm text-white">
|
17 |
<Heart size={14} />
|
18 |
{space.likes}
|
|
|
1 |
+
import { Cpu, Heart } from "lucide-react";
|
2 |
|
3 |
import { Space } from "@/utils/types";
|
4 |
|
|
|
12 |
className={`bg-gradient-to-br ${space.colorFrom} ${space.colorTo} -z-[1] blur-lg opacity-50 h-full w-full absolute top-0 left-0`}
|
13 |
/>
|
14 |
<div className="flex items-center justify-between w-full relative">
|
15 |
+
<div className="bg-white/15 border border-white/20 text-white px-1.5 py-0.5 rounded-md flex items-center justify-center gap-1 font-serif text-xs">
|
16 |
+
<Cpu size={14} />
|
17 |
+
{space.runtime.hardware.current ?? "unknown"}
|
18 |
+
</div>
|
19 |
<p className="flex items-center justify-end gap-1 text-sm text-white">
|
20 |
<Heart size={14} />
|
21 |
{space.likes}
|
utils/types.ts
CHANGED
@@ -22,4 +22,7 @@ export interface SpaceAuthorData {
|
|
22 |
|
23 |
export interface SpaceRuntime {
|
24 |
stage: string;
|
|
|
|
|
|
|
25 |
}
|
|
|
22 |
|
23 |
export interface SpaceRuntime {
|
24 |
stage: string;
|
25 |
+
hardware: {
|
26 |
+
current: string;
|
27 |
+
}
|
28 |
}
|