enzostvs HF Staff commited on
Commit
6b8f11b
·
1 Parent(s): 1688a3c

display error in loading card

Browse files
app/api/route.ts CHANGED
@@ -45,7 +45,6 @@ export async function POST(
45
  if (isNSFW?.error && isNSFW?.estimated_time) {
46
  setTimeout(() => {
47
  checkIfIsNSFW(blob)
48
- console.log('retry')
49
  }, isNSFW?.estimated_time * 100);
50
  } else resolve(isNSFW)
51
  })
 
45
  if (isNSFW?.error && isNSFW?.estimated_time) {
46
  setTimeout(() => {
47
  checkIfIsNSFW(blob)
 
48
  }, isNSFW?.estimated_time * 100);
49
  } else resolve(isNSFW)
50
  })
components/main/collections/loading.tsx CHANGED
@@ -37,7 +37,9 @@ export const CollectionLoading: React.FC<Props> = ({
37
  </div>
38
  )}
39
  <p className="text-white/70 font-semibold text-xl">
40
- {error ?? prompt?.length > 180
 
 
41
  ? `${prompt.slice(0, 180)}...`
42
  : prompt}
43
  </p>
 
37
  </div>
38
  )}
39
  <p className="text-white/70 font-semibold text-xl">
40
+ {error
41
+ ? error
42
+ : prompt?.length > 180
43
  ? `${prompt.slice(0, 180)}...`
44
  : prompt}
45
  </p>
components/main/hooks/useCollections.ts CHANGED
@@ -28,7 +28,6 @@ export const useCollections = (category: string) => {
28
  if (!response.ok) {
29
  throw new Error(data.message)
30
  }
31
- console.log(data)
32
  return {
33
  images: data?.collections,
34
  pagination: data?.pagination,
 
28
  if (!response.ok) {
29
  throw new Error(data.message)
30
  }
 
31
  return {
32
  images: data?.collections,
33
  pagination: data?.pagination,
prisma/schema.prisma CHANGED
@@ -4,7 +4,7 @@ generator client {
4
 
5
  datasource db {
6
  provider = "sqlite"
7
- url = "file://data/dev.db"
8
  }
9
 
10
  model Collection {
 
4
 
5
  datasource db {
6
  provider = "sqlite"
7
+ url = "file:../data/dev.db"
8
  }
9
 
10
  model Collection {