Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
next-old-version
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 3b658768
authored
2024-02-26 15:11:07 +0530
by
jay
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
c07e5b4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
src/pages/doctor-on-call.js
src/pages/doctor-on-call.js
View file @
3b65876
...
...
@@ -13,6 +13,28 @@ const DoctorOnCall = () => {
export
default
DoctorOnCall
;
const
bindMiddleware
=
middleware
=>
{
if
(
process
.
env
.
NODE_ENV
!==
"production"
)
{
const
{
composerWithDevTools
,
composeWithDevTools
}
=
require
(
"redux-devtools-extension"
);
return
composeWithDevTools
(
applyMiddleware
(...
middleware
));
}
return
applyMiddleware
(...
middleware
);
};
const
reducer
=
(
state
,
action
)
=>
{
if
(
action
.
type
===
HYDRATE
)
{
const
nextState
=
{
...
state
,
...
action
.
payload
};
return
nextState
;
}
else
{
return
reducers
(
state
,
action
);
}
};
const
initStore
=
()
=>
{
return
createStore
(
reducer
,
bindMiddleware
([
thunkMiddleware
]));
};
export
const
wrapper
=
createWrapper
(
initStore
);
/** For server side rendering */
export
const
getStaticProps
=
wrapper
.
getStaticProps
(
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment