File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ import { ChevronRight, Upload } from "lucide-react";
44import Link from "next/link" ;
55
66import { Button } from "~/components/ui/button" ;
7- import type { files , folders } from "~/server/db/schema" ;
7+ import type { files_table , folders_table } from "~/server/db/schema" ;
88
99import { FileRow , FolderRow } from "./file-row" ;
1010
1111export default function DriveContents ( props : {
12- files : ( typeof files . $inferSelect ) [ ] ;
13- folders : ( typeof folders . $inferSelect ) [ ] ;
14- parents : ( typeof folders . $inferSelect ) [ ] ;
12+ files : ( typeof files_table . $inferSelect ) [ ] ;
13+ folders : ( typeof folders_table . $inferSelect ) [ ] ;
14+ parents : ( typeof folders_table . $inferSelect ) [ ] ;
1515} ) {
1616 const handleUpload = ( ) => {
1717 alert ( "Upload functionality would be implemented here" ) ;
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { z } from "zod";
33
44import { db } from "~/server/db" ;
55import {
6- files as fileSchema ,
7- folders as folderSchema ,
6+ files_table as fileSchema ,
7+ folders_table as folderSchema ,
88} from "~/server/db/schema" ;
99
1010import DriveContents from "../../drive-contents" ;
Original file line number Diff line number Diff line change 11import { FileIcon , Folder as FolderIcon } from "lucide-react" ;
22import Link from "next/link" ;
33
4- import type { files , folders } from "~/server/db/schema" ;
4+ import type { files_table , folders_table } from "~/server/db/schema" ;
55
6- export function FileRow ( props : { file : typeof files . $inferSelect } ) {
6+ export function FileRow ( props : { file : typeof files_table . $inferSelect } ) {
77 const { file } = props ;
88
99 return (
@@ -29,7 +29,9 @@ export function FileRow(props: { file: typeof files.$inferSelect }) {
2929 ) ;
3030}
3131
32- export function FolderRow ( props : { folder : typeof folders . $inferSelect } ) {
32+ export function FolderRow ( props : {
33+ folder : typeof folders_table . $inferSelect ;
34+ } ) {
3335 const { folder } = props ;
3436
3537 return (
Original file line number Diff line number Diff line change 88
99const createTable = singlestoreTableCreator ( ( name ) => `drive_tutorial_${ name } ` ) ;
1010
11- export const files = createTable (
11+ export const files_table = createTable (
1212 "files" ,
1313 {
1414 id : bigint ( "id" , { mode : "number" , unsigned : true } )
@@ -22,7 +22,7 @@ export const files = createTable(
2222 ( table ) => [ index ( "parent_index" ) . on ( table . parent ) ] ,
2323) ;
2424
25- export const folders = createTable (
25+ export const folders_table = createTable (
2626 "folders" ,
2727 {
2828 id : bigint ( "id" , { mode : "number" , unsigned : true } )
You can’t perform that action at this time.
0 commit comments