Skip to content

Commit

Permalink
Fixes TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterRoll committed Oct 15, 2024
1 parent 19ceecc commit ac1aec3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/app/(dashboard)/data/features/[featureId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default async function FeatureId({ params }: { params: { featureId: strin
const headers = lines[0].split("\t");

for (let i = 1; i < lines.length; i++) {
const obj = {};
const obj = {} as { featureid: String, species: String };
const currentline = lines[i].split("\t");

for (let j = 0; j < headers.length; j++) {
Expand All @@ -21,7 +21,7 @@ export default async function FeatureId({ params }: { params: { featureId: strin

result.push(obj);
}
const feature = result.find((f) => f.featureid === params.featureId);
const feature = result.find((f) => f.featureid === params.featureId) as { featureid: String, species: String };
//const records = parse(content, { bom: true, columns: true });
//console.log(records)

Expand Down
6 changes: 3 additions & 3 deletions frontend/app/(dashboard)/data/taxonomies/[taxonomy]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default async function FeatureId({ params }: { params: { taxonomy: string
const headers = lines[0].split("\t");

for (let i = 1; i < lines.length; i++) {
const obj = {};
const obj = {} as { featureid: String, species: String };
const currentline = lines[i].split("\t");

for (let j = 0; j < headers.length; j++) {
Expand All @@ -31,8 +31,8 @@ export default async function FeatureId({ params }: { params: { taxonomy: string
{/*<h2>{features[0]}</h2>*/}
<div>
<h2>Features:</h2>
{features.map((f) => (
<Link key={f.featureid} href={`${getBaseUrl()}/data/features/${f.featureid}`}>
{features.map((f, i) => (
<Link key={i} href={`${getBaseUrl()}/data/features/${f.featureid}`}>
<div className="card bg-neutral-content m-3">
<div className="card-body p-5">
{f.featureid}
Expand Down

0 comments on commit ac1aec3

Please sign in to comment.