From f235d67e51fc659b50fefdb314c53efa3d0746b5 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Sat, 18 Sep 2021 17:48:19 +0100 Subject: [PATCH] Update project structure --- .editorconfig | 5 + src/App.tsx | 56 +- src/components/{Card.tsx => Card/index.tsx} | 28 +- src/components/Card/styles.ts | 28 + src/components/Container.tsx | 12 - src/components/Container/index.tsx | 12 + .../{Footer.tsx => Footer/index.tsx} | 32 +- src/components/Footer/styles.ts | 25 + src/components/GlobalStyles.tsx | 15 - src/components/GlobalStyles/index.tsx | 15 + src/components/Loader.tsx | 19 - src/components/Loader/index.tsx | 21 + src/components/NavBar.tsx | 29 - src/components/NavBar/index.tsx | 17 + src/components/NavBar/styles.ts | 13 + src/components/SearchBar.tsx | 55 - src/components/SearchBar/index.tsx | 30 + src/components/SearchBar/styles.ts | 23 + src/css/weather-icons-wind.min.css | 5336 ++++++++++++++++- src/css/weather-icons.min.css | 1825 +++++- .../weathericons-regular-webfont.eot | Bin .../weathericons-regular-webfont.svg | 0 .../weathericons-regular-webfont.ttf | Bin .../weathericons-regular-webfont.woff | Bin .../weathericons-regular-webfont.woff2 | Bin src/pages/Home.tsx | 298 - src/pages/Home/index.tsx | 205 + src/pages/Home/styles.ts | 56 + src/pages/NotFound.tsx | 20 - src/pages/NotFound/index.tsx | 12 + src/pages/NotFound/styles.ts | 9 + src/pages/Search.tsx | 297 - src/pages/Search/index.tsx | 190 + src/pages/Search/styles.ts | 56 + src/types/forecast.ts | 25 + src/types/weather.ts | 40 + 36 files changed, 7973 insertions(+), 831 deletions(-) create mode 100644 .editorconfig rename src/components/{Card.tsx => Card/index.tsx} (65%) create mode 100644 src/components/Card/styles.ts delete mode 100644 src/components/Container.tsx create mode 100644 src/components/Container/index.tsx rename src/components/{Footer.tsx => Footer/index.tsx} (54%) create mode 100644 src/components/Footer/styles.ts delete mode 100644 src/components/GlobalStyles.tsx create mode 100644 src/components/GlobalStyles/index.tsx delete mode 100644 src/components/Loader.tsx create mode 100644 src/components/Loader/index.tsx delete mode 100644 src/components/NavBar.tsx create mode 100644 src/components/NavBar/index.tsx create mode 100644 src/components/NavBar/styles.ts delete mode 100644 src/components/SearchBar.tsx create mode 100644 src/components/SearchBar/index.tsx create mode 100644 src/components/SearchBar/styles.ts rename src/{font => fonts}/weathericons-regular-webfont.eot (100%) rename src/{font => fonts}/weathericons-regular-webfont.svg (100%) rename src/{font => fonts}/weathericons-regular-webfont.ttf (100%) rename src/{font => fonts}/weathericons-regular-webfont.woff (100%) rename src/{font => fonts}/weathericons-regular-webfont.woff2 (100%) delete mode 100644 src/pages/Home.tsx create mode 100644 src/pages/Home/index.tsx create mode 100644 src/pages/Home/styles.ts delete mode 100644 src/pages/NotFound.tsx create mode 100644 src/pages/NotFound/index.tsx create mode 100644 src/pages/NotFound/styles.ts delete mode 100644 src/pages/Search.tsx create mode 100644 src/pages/Search/index.tsx create mode 100644 src/pages/Search/styles.ts create mode 100644 src/types/forecast.ts create mode 100644 src/types/weather.ts diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..31a9930 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +[*.{html,css,js,ts,jsx,tsx,json}] +charset = utf-8 +indent_style = tab +indent_size = 2 +quote_type= single \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index b76cd06..851204e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,32 +11,32 @@ import './css/weather-icons.min.css'; import './css/weather-icons-wind.min.css'; const App: React.FC = () => { - return ( - <> - - - - - - - - - - - - - - - - - - - - -