-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add_clear_button
- Loading branch information
Showing
6 changed files
with
179 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ function Footer(){ | |
) | ||
} | ||
|
||
export default | ||
export default Footer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
import React from "react" | ||
import "./index.css" | ||
import React from "react"; | ||
import "./index.css"; | ||
|
||
|
||
function Footer(){ | ||
return( | ||
<footer> | ||
<div className="container"> | ||
<center> | ||
<p className="p-footer">Made with the ❤️ by <a href="https://github.com/surajondev">Suraj Vishwakarma</a></p> | ||
<p className="p-footer">Made with ❤️ by <a href="https://github.com/surajondev">Suraj Vishwakarma</a></p> | ||
<p className="p-footer">Made with <span role="img" aria-labelledby="love">❤️</span> by <a href="https://github.com/surajondev">Suraj Vishwakarma</a></p> | ||
<p className="p-footer">Source <a href="https://openweathermap.org/">OpenWeather</a></p> | ||
</center> | ||
</div> | ||
</footer> | ||
) | ||
} | ||
function Footer() { | ||
const year = new Date().getFullYear(); | ||
|
||
export default Footer | ||
return ( | ||
<footer> | ||
<div className="container"> | ||
<center> | ||
|
||
<p className="p-footer">Source <a href="https://openweathermap.org/">OpenWeather</a></p> | ||
<p className='footer1' id="copyright">© {year} MADE WITH ❤️ BY SURAJ VISHWAKARMA</p> | ||
</center> | ||
</div> | ||
</footer> | ||
); | ||
} | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// ThemeContext.js | ||
import React, { createContext, useContext, useState } from 'react'; | ||
|
||
const ThemeContext = createContext(); | ||
|
||
export function ThemeProvider({ children }) { | ||
const [theme, setTheme] = useState('light'); | ||
|
||
const toggleTheme = () => { | ||
setTheme((currentTheme) => (currentTheme === 'light' ? 'dark' : 'light')); | ||
}; | ||
|
||
return ( | ||
<ThemeContext.Provider value={{ theme, toggleTheme }}> | ||
{children} | ||
</ThemeContext.Provider> | ||
); | ||
} | ||
|
||
export function useTheme() { | ||
return useContext(ThemeContext); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters