Skip to content

Commit 047dd7c

Browse files
committed
refine the ssr
1 parent 628ee69 commit 047dd7c

6 files changed

Lines changed: 1502 additions & 13 deletions

File tree

bun.lock

Lines changed: 1494 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"prop-types": "15.8.1",
2525
"react": "18.3.1",
2626
"react-dom": "18.3.1",
27-
"sass": "^1.80.6",
2827
"zustand": "^5.0.1"
2928
},
3029
"devDependencies": {

pages/8.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Index from ".";
22

3-
export default function Sem() {
3+
function Sem() {
44
return (
55
<>
66
<Index />

pages/_app.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import CssBaseline from "@mui/material/CssBaseline";
66
import { CacheProvider } from "@emotion/react";
77
import theme from "../src/theme";
88
import createEmotionCache from "../src/createEmotionCache";
9-
import dynamic from "next/dynamic";
109

1110
// Client-side cache, shared for the whole session of the user in the browser.
1211
const clientSideEmotionCache = createEmotionCache();
1312

14-
function MyApp(props) {
13+
export default function MyApp(props) {
1514
const {
1615
Component,
1716
emotionCache = clientSideEmotionCache,
@@ -297,7 +296,3 @@ MyApp.propTypes = {
297296
emotionCache: PropTypes.object,
298297
pageProps: PropTypes.object.isRequired,
299298
};
300-
301-
export default dynamic(() => Promise.resolve(MyApp), {
302-
ssr: false,
303-
});

pages/_document.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ export default class MyDocument extends Document {
1414
return (
1515
<Html lang="en" className={roboto.className}>
1616
<Head>
17-
<title key="title">
18-
CSIT21 - SXC B.Sc. CSIT Batch 2021
19-
</title>
2017
<meta
2118
key="og:image"
2219
property="og:image"

pages/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import {
77
CardContent,
88
Container,
99
Toolbar,
10-
Typography,
1110
} from "@mui/material";
1211
import Grid from "@mui/material/Grid2";
12+
import dynamic from "next/dynamic";
1313

1414
import Materials from "../components/Materials";
1515
import Soon from "../components/Soon";
@@ -28,7 +28,7 @@ import Feedback from "../components/Feedback";
2828
import Countdown from "../components/Countdown";
2929
// import LeftSideCardMessage from "../components/LeftSideCardMessage";
3030

31-
export default function Index() {
31+
function Index() {
3232
const theme = useTheme();
3333
const isDesktop = useMediaQuery(theme.breakpoints.up("sm"));
3434

@@ -280,3 +280,7 @@ export default function Index() {
280280
</>
281281
);
282282
}
283+
284+
export default dynamic(() => Promise.resolve(Index), {
285+
ssr: false,
286+
});

0 commit comments

Comments
 (0)