Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6 -select time period on map- Delnia #35

Merged
merged 13 commits into from
Oct 12, 2023

Conversation

DelniaAlipour
Copy link
Collaborator

@DelniaAlipour DelniaAlipour commented Oct 6, 2023

Naming Rules

Name your PR like this: ISSUENUMBER-TITLE-YOURNAME

Description

The functionality (for now) is selecting a time period, by decade, within 1400 to present day with a slider.

#6

Make sure you include the issue number with a hash sign # so Github can link this PR to the right issue, like this:

Fixes

Checklist:

  • My code follows the style guidelines of this project
  • I have carefully reviewed my own code
  • I have commented my code
  • I have updated any documentation

Copy link
Collaborator

@mferryRV mferryRV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this despite the lack of designs!

import React, { useState, useEffect } from "react";
import DualRangeSlider from "./DualRangeSlider";

const RhythmsWithSlider = ({ rhythms }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good illustration of how the component will operate using state. When it's integrated, we should look to move this state into the main page.

import DualRangeSlider from "./DualRangeSlider";

const RhythmsWithSlider = ({ rhythms }) => {
const [selectedRange, setSelectedRange] = useState([1400, 2023]);
Copy link
Collaborator

@mferryRV mferryRV Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For long-term projects, it's better to use something like Date.now() and get the year rather than hard-coding, but good illustration of the max/min

@DelniaAlipour DelniaAlipour merged commit 0f1196e into main Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants