DeathDaDev commited on
Commit
b75f205
1 Parent(s): b94d224

fix: replace missing `fetchSpaceRandomly` with `fetchFilteredSpaces` in `getSpace` function

Browse files
Files changed (1) hide show
  1. app/actions.ts +3 -3
app/actions.ts CHANGED
@@ -1,8 +1,8 @@
1
  "use server"
2
 
3
- import { fetchSpaceRandomly } from "@/utils/network"
4
 
5
  export const getSpace = async () => {
6
- const space = await fetchFilteredSpaces('gpu', '');
7
- return space;
8
  }
 
1
  "use server"
2
 
3
+ import { fetchFilteredSpaces } from "@/utils/network";
4
 
5
  export const getSpace = async () => {
6
+ const spaces = await fetchFilteredSpaces('gpu', '');
7
+ return spaces.length > 0 ? spaces[0] : null;
8
  }