Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tfhuhtal authored and sutigit committed Jan 24, 2025
1 parent ab4ee46 commit 187aae9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/components/V1/DataComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import useFetchKeyData from '../../hooks/useFetchKeyData'

interface CustomCardProps {
type: string;
data: any;
type: string
data: any
}

const CustomCard = ({ type, data }: CustomCardProps) => {
Expand All @@ -20,17 +20,15 @@ const CustomCard = ({ type, data }: CustomCardProps) => {
)
}


const DataComponent = () => {
const keyData = useFetchKeyData()

if (!keyData || !keyData[0].data) return <div>Loading...</div>
if (!keyData || keyData === 0 || !keyData[0].data) return <div>Loading...</div>

const dataMap = keyData[0].data

return (
<div>
<h1>Page</h1>
<ul>
{Object.keys(dataMap).map((key: string) => (
<>
Expand Down

0 comments on commit 187aae9

Please sign in to comment.