Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function RootLayout({
return (
<html lang="en" className={geistSans.className} suppressHydrationWarning>
<body className="bg-background text-foreground">

{/* <ThemeProvider
attribute="class"
defaultTheme="system"
Expand All @@ -51,22 +52,14 @@ export default function RootLayout({
</div>
</nav> */}
<div >

{children}
</div>

{/* <footer className="w-full flex items-center justify-center border-t mx-auto text-center text-xs gap-8 py-16">
<p>
Powered by{" "}
<a
href="https://supabase.com/?utm_source=create-next-app&utm_medium=template&utm_term=nextjs"
target="_blank"
className="font-bold hover:underline"
rel="noreferrer"
>
Supabase
</a>
Built for HackBeanPot 2025 with 💖
</p>
<ThemeSwitcher />
</footer>
</div>
</main> */}
Expand Down
7 changes: 2 additions & 5 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import Hero from "@/components/hero";
import TranscriptUpload from "@/components/transcript-upload";
import ConnectSupabaseSteps from "@/components/tutorial/connect-supabase-steps";
import SignUpUserSteps from "@/components/tutorial/sign-up-user-steps";
import { hasEnvVars } from "@/utils/supabase/check-env-vars";

export default async function Home() {
return (
<>
<Hero />
<main className="flex-1 flex flex-col gap-6 px-4">
<h2 className="font-medium text-xl mb-4">Next steps</h2>
{hasEnvVars ? <SignUpUserSteps /> : <ConnectSupabaseSteps />}
</main>
<h1>Home</h1>
</>
);
}
10 changes: 10 additions & 0 deletions app/transcript/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import TranscriptUpload from "@/components/transcript-upload";

export default function TranscriptPage() {
return (
<div>
<h1>Update Transcript</h1>
<TranscriptUpload />
</div>
)
}
61 changes: 61 additions & 0 deletions components/transcript-upload.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"use client";
import { useState, useCallback } from "react";
import { useDropzone } from "react-dropzone";

export default function TranscriptUpload() {
const [files, setFiles] = useState<File[]>([]);

const onDrop = useCallback((acceptedFiles: File[]) => {
setFiles(acceptedFiles);

acceptedFiles.forEach((file) => {
if (file.type === "text/plain") {
const reader = new FileReader();
reader.onload = () => {
const content = reader.result as string;
console.log(`File: ${file.name}\nContent:\n${content}`);
};
reader.readAsText(file);
} else {
console.log(`File: ${file.name} is not a valid text file`);
}
});
}, []);

const { getRootProps, getInputProps, isDragActive } = useDropzone({
onDrop,
accept: {
"text/plain": [".txt"],
},
});

return (
<div
{...getRootProps()}
className={`p-8 border-2 border-dashed rounded-lg text-center cursor-pointer transition-colors ${
isDragActive
? "border-primary bg-primary/10"
: "border-gray-300 hover:border-primary"
}`}
>
<input {...getInputProps()} />
{isDragActive ? (
<p>Drop the files here ...</p>
) : (
<p>Drag 'n' drop some text files here, or click to select files</p>
)}
{files.length > 0 && (
<div className="mt-4">
<h4 className="text-sm font-semibold">Uploaded files:</h4>
<ul className="list-disc list-inside">
{files.map((file) => (
<li key={file.name} className="text-sm">
{file.name}
</li>
))}
</ul>
</div>
)}
</div>
);
}
70 changes: 68 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"next-themes": "^0.4.3",
"prettier": "^3.3.3",
"react": "19.0.0",
"react-dom": "19.0.0"
"react-dom": "19.0.0",
"react-dropzone": "^14.3.5"
},
"devDependencies": {
"@types/node": "22.10.2",
Expand Down