You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After loggin in, the home page is getting displayed instead of the dashboard. Also, none of the links to the dashboard is working.
Here is my Dashboard file.
'use client'
import { trpc } from '@/app/_trpc/client'
import UploadButton from './UploadButton'
import {
Ghost,
Loader2,
MessageSquare,
Plus,
Trash,
} from 'lucide-react'
import Skeleton from 'react-loading-skeleton'
import Link from 'next/link'
import { format } from 'date-fns'
import { Button } from './ui/button'
import { useState } from 'react'
import { getUserSubscriptionPlan } from '@/lib/stripe'
After loggin in, the home page is getting displayed instead of the dashboard. Also, none of the links to the dashboard is working.
Here is my Dashboard file.
'use client'
import { trpc } from '@/app/_trpc/client'
import UploadButton from './UploadButton'
import {
Ghost,
Loader2,
MessageSquare,
Plus,
Trash,
} from 'lucide-react'
import Skeleton from 'react-loading-skeleton'
import Link from 'next/link'
import { format } from 'date-fns'
import { Button } from './ui/button'
import { useState } from 'react'
import { getUserSubscriptionPlan } from '@/lib/stripe'
interface PageProps {
subscriptionPlan: Awaited<ReturnType>
}
const Dashboard = ({subscriptionPlan}: PageProps) => {
const [currentlyDeletingFile, setCurrentlyDeletingFile] =
useState<string | null>(null)
const utils = trpc.useUtils()
const { data: files, isLoading } =
trpc.getUserFiles.useQuery()
const { mutate: deleteFile } =
trpc.deleteFile.useMutation({
onSuccess: () => {
utils.getUserFiles.invalidate()
},
onMutate({ id }) {
setCurrentlyDeletingFile(id)
},
onSettled() {
setCurrentlyDeletingFile(null)
},
}
)
return (
My Files
)
}
export default Dashboard
The text was updated successfully, but these errors were encountered: