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 6423587d
authored
2024-02-26 16:11:24 +0530
by
jay
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
3b658768
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
32 deletions
src/pages/doctor-on-call.js
src/pages/doctor-on-call.js
View file @
6423587
...
...
@@ -6,45 +6,27 @@ const DoctorOnCall = () => {
<
div
>
<
h1
>
Hello
world
<
/h1
>
<
span
className
=
""
><
/span
>
<
Image
width
=
"3000px"
height
=
"600px"
src
=
"/banner/abu-faqs-d.png"
><
/Image
>
<
Image
priority
=
{
true
}
width
=
"3000px"
height
=
"600px"
src
=
"/banner/abu-faqs-d.png"
><
/Image
>
<
/div
>
);
};
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
(
(
store
)
=>
async
({
req
,
query
})
=>
{
// Get the menu data.
// This function gets called at build time
export
async
function
getStaticProps
()
{
// Call an external API endpoint to get posts
// const res = await fetch('https://.../posts')
// const posts = await res.json()
// By returning { props: { posts } }, the Blog component
// will receive `posts` as a prop at build time
return
{
props
:
{},
revalidate
:
100
,
};
}
);
}
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