Skip to content

Commit

Permalink
Merge branch 'trunk' - complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-cronic committed Nov 28, 2023
2 parents 7e49593 + 24d4f9a commit c4f2770
Show file tree
Hide file tree
Showing 21 changed files with 4,798 additions and 1,380 deletions.
7 changes: 3 additions & 4 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ import PublicEvents from "./components/PublicEvents";
const App = () => {
return (
<Routes>
<Route path="/" element={<Layout /> }>
<Route index={true} element={<PublicPage />} />

<Route path="/" element={<Layout />}>
<Route element={<PrefetchEvents />}>
<Route index={true} element={<PublicPage />} />

{/* browse events as a guest */}
<Route path="/events/*" element={<PublicEvents/>}/>
<Route path="/events/*" element={<PublicEvents />} />

<Route path="/login" element={<Login />} />

Expand Down
6 changes: 0 additions & 6 deletions client/src/app/api/apiSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const baseQuery = fetchBaseQuery({

const baseQueryWithRefreshAuth = async (args, api, extraOptions) => {

const publicEndpoints = ['/events/search','/events/sort']

if (publicEndpoints.includes(args.endpoint) ) {

return baseQuery(args, api, extraOptions);
}

let originalResult = await baseQuery(args, api, extraOptions)

Expand Down
7 changes: 4 additions & 3 deletions client/src/features/event/EventList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const EventList = () => {
isError,
error,
} = useGetEventsQuery("eventsList", {
//15min
pollingInterval: 900000,

//15min 90000
pollingInterval: 2000,
refetchOnFocus: true,
refetchOnMountOrArgChange: true,
});
Expand Down Expand Up @@ -44,7 +45,7 @@ const EventList = () => {
{role === "ADMIN" && isAdmin ? (
<Container className="my-2">
<LinkContainer to={"/dash/events/new"}>
<Button variant="warning">Add New Event</Button>
<Button variant="success">Add New Event</Button>
</LinkContainer>
</Container>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/usePublicOrPrivateNavigate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const usePublicOrPrivateNavigate = () => {

const authObj = useAuth();

console.log('authObj from customHook: ', authObj);
// console.log('authObj from customHook: ', authObj);
const navigate = useNavigate();

const navigateFn = (publicPathname) => {
Expand Down
9 changes: 9 additions & 0 deletions server/jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{

"verbose": true,

"forceExit": true,
"clearMocks":true,
"resetMocks": true,
"restoreMocks":true
}
Loading

0 comments on commit c4f2770

Please sign in to comment.