mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-24 20:03:41 +03:00
feature: empty brain
This commit is contained in:
parent
9103e97ef0
commit
bfc4d458fe
@ -3,6 +3,8 @@ import { useState, useEffect } from "react";
|
||||
import axios from "axios";
|
||||
import DocumentItem from "./DocumentItem";
|
||||
import { Document } from "./types";
|
||||
import Button from "../components/ui/Button";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function ExplorePage() {
|
||||
const [documents, setDocuments] = useState<Document[]>([]);
|
||||
@ -33,9 +35,18 @@ export default function ExplorePage() {
|
||||
<h2 className="opacity-50">View what’s in your second brain</h2>
|
||||
</div>
|
||||
<div className="w-full max-w-xl flex flex-col gap-5">
|
||||
{documents.map((document, index) => (
|
||||
<DocumentItem key={index} document={document} />
|
||||
))}
|
||||
{documents.length !== 0 ? (
|
||||
documents.map((document, index) => (
|
||||
<DocumentItem key={index} document={document} />
|
||||
))
|
||||
) : (
|
||||
<div className="flex flex-col items-center justify-center mt-10 gap-1">
|
||||
<p className="text-center">Oh No, Your Brain is empty.</p>
|
||||
<Link href="/upload">
|
||||
<Button>Upload Files</Button>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user