Skip to content

Commit

Permalink
added seasonal-planting-guide route for testing PlantList
Browse files Browse the repository at this point in the history
  • Loading branch information
kylezryr committed Oct 20, 2024
1 parent 620832b commit ec6060f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
58 changes: 58 additions & 0 deletions app/seasonal-planting-guide/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
'use client';

import React, { useState } from 'react';
// import FilterDropdown from '@/components/FilterDropdown';
import { PlantList } from '@/components/PlantList';

interface SeasonalPlantingGuideProps {}

const SeasonalPlantingGuide = (props: SeasonalPlantingGuideProps) => {

Check failure on line 9 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'props' is defined but never used

Check failure on line 9 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'props' is defined but never used
const growingSeasonOptions = ['Spring', 'Summer', 'Fall', 'Winter'];

Check failure on line 10 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'growingSeasonOptions' is assigned a value but never used

Check failure on line 10 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'growingSeasonOptions' is assigned a value but never used
const harvestSeasonOptions = ['Spring', 'Summer', 'Fall', 'Winter'];

Check failure on line 11 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'harvestSeasonOptions' is assigned a value but never used

Check failure on line 11 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'harvestSeasonOptions' is assigned a value but never used
const plantingTypeOptions = [

Check failure on line 12 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'plantingTypeOptions' is assigned a value but never used

Check failure on line 12 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'plantingTypeOptions' is assigned a value but never used
'Start Seeds Indoors',
'Start Seeds Outdoors',
'Plant Seedlings/Transplant Outdoors',
];

const [growingSeason, setGrowingSeason] = useState<string>('');

Check failure on line 18 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'setGrowingSeason' is assigned a value but never used

Check failure on line 18 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'setGrowingSeason' is assigned a value but never used
const [harvestSeason, setHarvestSeason] = useState<string>('');

Check failure on line 19 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'setHarvestSeason' is assigned a value but never used

Check failure on line 19 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'setHarvestSeason' is assigned a value but never used
const [plantingType, setPlantingType] = useState<string>('');

Check failure on line 20 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'setPlantingType' is assigned a value but never used

Check failure on line 20 in app/seasonal-planting-guide/page.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'setPlantingType' is assigned a value but never used

return (
//hide filter dropdowns for now, will be done in another PR
<div>
{/* <FilterDropdown
name="growingSeason"
id="growingSeason"
setStateAction={setGrowingSeason}
options={growingSeasonOptions}
placeholder="Growing Season"
/>
<FilterDropdown
name="harvestSeason"
id="harvestSeason"
setStateAction={setHarvestSeason}
options={harvestSeasonOptions}
placeholder="Harvest Season"
/>
<FilterDropdown
name="plantingType"
id="plantingType"
setStateAction={setPlantingType}
options={plantingTypeOptions}
placeholder="Planting Type"
/> */}

<PlantList
growing_season={growingSeason}
harvest_season={harvestSeason}
planting_type={plantingType}
/>
</div>
);
};

export default SeasonalPlantingGuide;
8 changes: 7 additions & 1 deletion components/PlantList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import React, { useEffect, useState } from 'react';
import { getPlantSeasonality } from '@/api/supabase/queries/plantSeasonality';
import { Plant } from '@/types/schema';

export const PlantList = () => {
interface PlantListProps {
growing_season: string;
harvest_season: string;
planting_type: string;
}

export const PlantList = (props: PlantListProps) => {

Check failure on line 11 in components/PlantList.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'props' is defined but never used

Check failure on line 11 in components/PlantList.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint, Prettier, and TypeScript compiler

'props' is defined but never used
const [plants, setPlants] = useState<Plant[]>([]);

useEffect(() => {
Expand Down

0 comments on commit ec6060f

Please sign in to comment.