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

Fix #96 - Refactor structure of project #97

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ This project based on Google Maps API.
- MUI, Tailwind, SCSS (I trying to rewrite it)
- Prettier, ESLint, i18next

You need backend, which is [here](https://github.com/CoffeeladyCZ/maps-coffee-api).

### Future feature:
- Login section for users, possibility to add new cafes after login
20 changes: 7 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { BrowserRouter as Router } from 'react-router-dom';
import { PopUpStateProvider } from './contexts/PopupContext';
import { MapsStateProvider } from './contexts/MapsContext';
import MyRoutes from './routes/Routes';
import { Container, ThemeProvider } from '@mui/material';
import { theme } from './theme/theme.js';
Expand All @@ -19,17 +17,13 @@ const App = () => {
return (
<Provider store={store}>
<ThemeProvider theme={theme}>
<MapsStateProvider>
<PopUpStateProvider>
<Container>
<Router>
<Header />
<MyRoutes />
<Footer />
</Router>
</Container>
</PopUpStateProvider>
</MapsStateProvider>
<Container>
<Router>
<Header />
<MyRoutes />
<Footer />
</Router>
</Container>
</ThemeProvider>
</Provider>
);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/Header/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';

import { Grid } from '@mui/material';
import User from './User';
import LanguageSwitch from '../common/LanguageSwitch';
import LanguageSwitch from './LanguageSwitch';

const Header: React.FC = () => {
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useTranslation } from 'react-i18next';

import { Language } from '@mui/icons-material';
import { Button } from '@mui/material';

import { setLanguage } from '../../store/settings';
Expand Down
14 changes: 0 additions & 14 deletions src/components/Registration/AppRegistration.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { GoogleMap, LoadScript } from '@react-google-maps/api';
import React, { useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';

import MarkerComponent from '../Marker/AppMarker';
import MarkerComponent from '../../Marker/AppMarker';

import coffeePin from '../../img/newPin.svg';
import coffeePin from '../../../img/newPin.svg';

import { RootState } from '../../store';
import { CafeDetailResponse } from '../../types/cafe';
import { setActualCafe } from '../../store/cafeDetail';
import { RootState } from '../../../store';
import { CafeDetailResponse } from '../../../types/cafe';
import { setActualCafe } from '../../../store/cafeDetail';

interface MapProps {
height: string;
Expand Down
59 changes: 0 additions & 59 deletions src/contexts/MapsContext.tsx

This file was deleted.

94 changes: 0 additions & 94 deletions src/contexts/PopupContext.tsx

This file was deleted.

Loading
Loading