mirror of
https://github.com/recloudstream/website.git
synced 2024-08-15 03:18:45 +00:00
oops
This commit is contained in:
parent
4aba8e0a7d
commit
55b673f4c5
2 changed files with 6 additions and 6 deletions
|
@ -3,11 +3,11 @@ import React, { useState, useEffect } from "react";
|
||||||
import CompatBtn from "../compatbtn";
|
import CompatBtn from "../compatbtn";
|
||||||
import { GoVerified } from "react-icons/go";
|
import { GoVerified } from "react-icons/go";
|
||||||
|
|
||||||
const RepoCard = ({ data, isFirst }) => {
|
const RepoCard = ({ repoData, isFirst }) => {
|
||||||
const [data, setData] = useState(null)
|
const [data, setData] = useState(null)
|
||||||
|
|
||||||
const url = (typeof data === 'string') ? data : data.url
|
const url = (typeof repoData === 'string') ? repoData : repoData.url
|
||||||
const isVerified = (typeof data === 'object' && data.verified)
|
const isVerified = (typeof repoData === 'object' && repoData.verified)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch(url)
|
fetch(url)
|
||||||
|
@ -22,8 +22,8 @@ const RepoCard = ({ data, isFirst }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return <article className="card bg-base-200 shadow-xl w-full mx-10 md:w-2/3 mb-5">
|
return <article className="card bg-base-200 shadow-xl w-full mx-10 md:w-2/3 mb-5">
|
||||||
<div className="card-body flex flex-row">
|
<div className="card-body">
|
||||||
<h2 className="card-title">
|
<h2 className="card-title flex flex-row">
|
||||||
{isVerified &&
|
{isVerified &&
|
||||||
<div class="tooltip" data-tip="Verified safe">
|
<div class="tooltip" data-tip="Verified safe">
|
||||||
<GoVerified class="stroke-current flex-shrink-0 h-6 w-6 success" />
|
<GoVerified class="stroke-current flex-shrink-0 h-6 w-6 success" />
|
||||||
|
|
|
@ -29,7 +29,7 @@ const IndexPage = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{repos &&
|
{repos &&
|
||||||
repos.map((it, index) => <RepoCard url={it} key={index} isFirst={index===0}/>)
|
repos.map((it, index) => <RepoCard repoData={it} key={index} isFirst={index===0}/>)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
Loading…
Reference in a new issue