Skip to content

danilosnt/Current-Time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Current Time

Component Structure

  1. App.jsx (Main Component)
  • Root component of the project.
  • Responsible for rendering other components: Title, Hour, and Gmt.
  • Manages the main state for the selected timezone to update the displayed time.
  1. Title.jsx
  • Simple component that displays the app’s title, such as “World Clock” or similar.
  • Used only for presentation and visual organization.
  1. Hour.jsx
  • Displays the current time based on the selected timezone.
  • Receives the GMT (timezone) value as a prop to adjust the shown time.
  • Updates the time in real-time, typically every second.
  1. Gmt.jsx
  • Contains a selector (select) that allows the user to choose the desired timezone (e.g., GMT-3, GMT+0, GMT+2, etc.).
  • When the selected value changes, it informs the App component to update the time shown in Hour.
  • Has predefined timezone options for easier selection.

Style

Obs: Every components have been edited in index.css. Except for Title.jsx, which uses the styled-components library where the styling is done inside the same file.

About

A website to practice React fundamentals.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors