Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshal Ranjhani authored and Harshal Ranjhani committed Apr 23, 2024
1 parent 67432bc commit ac5f074
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions app/user/stars/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,15 @@ import { redirect } from 'next/dist/server/api-utils'
import LeetCode from '@/components/leetcode'
import { StarsTable } from '@/components/stars-table'
import NoStarred from '@/components/no-starred.'
import { getUserDetails } from '../../settings/[id]/page'

export interface ChatPageProps {
params: {
id: string
}
}

export const getUserDetails = async (user_id: string): Promise<any> => {
if (!user_id) {
return null
}
if (user_id) {
try {
const response = await fetch(
`${process.env.NEXT_PUBLIC_URL}/api/user/getUserDetails`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_id
})
}
)
const data = await response.json()
return data
} catch (e: any) {
console.log(e.message)
// toast.error(e.message)
return null
}
}
}

export const getStarredQuestions = async (user_id: string): Promise<any> => {
const getStarredQuestions = async (user_id: string): Promise<any> => {
if (!user_id) {
return null
}
Expand Down

0 comments on commit ac5f074

Please sign in to comment.