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

change login label #50

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
76 changes: 75 additions & 1 deletion client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@elfalem/leaflet-curve": "^0.9.2",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/resolvers": "^3.3.2",
"@stripe/react-stripe-js": "^2.3.1",
"@stripe/stripe-js": "^2.1.9",
"@tanstack/react-query": "^5.0.0",
Expand All @@ -26,6 +27,8 @@
"leaflet-defaulticon-compatibility": "^0.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.47.0",
"react-hook-form-chakra": "^1.0.1",
"react-icons": "^4.11.0",
"react-leaflet": "^4.2.1",
"react-redux": "^8.1.3",
Expand All @@ -35,7 +38,8 @@
"redux": "^4.2.1",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.2",
"vite-plugin-svgr": "^4.1.0"
"vite-plugin-svgr": "^4.1.0",
"yup": "^1.3.2"
},
"devDependencies": {
"@types/leaflet": "^1.9.7",
Expand Down
45 changes: 41 additions & 4 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import TripsPage from './pages/trips/TripsPage';
import Dashboard from './pages/dashboard/Dashboard';
// import HomePage from './pages/homepage/Homepage';
import './App.css';
import UserMenu from './pages/user-menu/UserMenu';
import NotFound from './components/not-found/NotFound';
import UserForgotPassword from './pages/user-menu/UserForgotPassword';
import ProtectedRoute from './components/auth/ProtectedRoute';
Expand All @@ -19,6 +18,10 @@ import ScrollTop from './utils/ScrollTop';
import TripsShow from './pages/trips/TripsShow';
import TripsDetails from './pages/trips/TripsDetails';
import Bookings from './components/bookings/Bookings';
import UserSettings from './components/user-menu/UserSettings';
import UserSecurity from './components/user-menu/UserSecurity';
import UserProfile from './components/user-menu/UserProfile';
import BookingsPage from './pages/bookings/BookingsPage';

function App(): JSX.Element {
return (
Expand All @@ -35,15 +38,49 @@ function App(): JSX.Element {
<Route path='*' element={<NotFound />} />
</Route>
<Route path='/dashboard' element={<Dashboard />} />
<Route path='/user'>
<Route
path='/user/profile'
element={
<ProtectedRoute>
<UserProfile />
</ProtectedRoute>
}
/>
<Route
path='/user/security'
element={
<ProtectedRoute>
<UserSecurity />
</ProtectedRoute>
}
/>
<Route
path='/user/settings'
element={
<ProtectedRoute>
<UserSettings />
</ProtectedRoute>
}
/>
<Route
path='/user/bookings'
element={
<ProtectedRoute>
<BookingsPage />
</ProtectedRoute>
}
/>
</Route>
<Route
path='/user'
path='/forgot-password'
element={
<ProtectedRoute>
<UserMenu />
<UserForgotPassword />
</ProtectedRoute>
}
/>
<Route path='/forgot-password' element={<UserForgotPassword />} />

<Route path='/booking-session'>
<Route path=':tripId' element={<Bookings />} />
</Route>
Expand Down
14 changes: 7 additions & 7 deletions client/src/components/app-state/ShowError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ import { Flex, Text } from '@chakra-ui/react';

interface IErrorProps {
error?: string;
// statusCode: number;
// message: string;
// stack?: string;
statusCode?: number;
message?: string;
stack?: string;
}
const ShowError: React.FC<IErrorProps> = ({ error }) => {
const ShowError: React.FC<IErrorProps> = ({ message }) => {
return (
<Flex
boxShadow='lg'
justifyContent='center'
h='100vh'
// h='100vh'
mt='10%'
alignItems='stretch'
p='4'
overflow='scroll'
// overflow='scroll'
>
<Text color='red.400' fontSize='lg'>
Error: {error}
Error: {message}
</Text>
</Flex>
);
Expand Down
Loading