-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #751 from CodeForAfrica/fix/robot_ui_fouc
@/Roboshield fix FOUC bug
- Loading branch information
Showing
5 changed files
with
367 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,37 @@ | ||
import { Html, Head, Main, NextScript } from "next/document"; | ||
import * as React from "react"; | ||
import { | ||
Html, | ||
Head, | ||
Main, | ||
NextScript, | ||
DocumentProps, | ||
DocumentContext, | ||
} from "next/document"; | ||
import { | ||
DocumentHeadTags, | ||
DocumentHeadTagsProps, | ||
documentGetInitialProps, | ||
} from "@mui/material-nextjs/v14-pagesRouter"; | ||
|
||
export default function Document() { | ||
export default function MyDocument( | ||
props: DocumentProps & DocumentHeadTagsProps, | ||
) { | ||
return ( | ||
<Html lang="en"> | ||
<Head /> | ||
<Head> | ||
<link rel="shortcut icon" href="/favicon.ico" /> | ||
<meta name="emotion-insertion-point" content="" /> | ||
<DocumentHeadTags {...props} /> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
|
||
MyDocument.getInitialProps = async (ctx: DocumentContext) => { | ||
const finalProps = await documentGetInitialProps(ctx); | ||
return finalProps; | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.