Skip to content

Commit

Permalink
Remove unneeded js check/script for now, cleanup, add issues to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joonassandell committed Jun 7, 2023
1 parent 8d25c3f commit 2c7a34f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Aside from this readme, there is additional information about the whole project
- `npm run start`: Start the application in production mode. The application should be compiled with next build first.
- `npm run deploy:preview`: [Deploy preview](https://vercel.com/docs/concepts/deployments/preview-deployments) of the application to Vercel (preview is like "staging"). Note that this deploys your local copy no matter of the git commit state.

### Issues

- Oras, last drop is not animated to the end. Possibly related to locomotive-scroll/react-locomotive-scroll updates. Noticed in production.
- Info: Not animating in, possible issue with useInView. Noticed in production.

### Notes

- Previews are deployed always locally so that the preview url stays the same. `urlState` fn needs the origin url (`NEXT_PUBLIC_ORIGIN`) which needs to match the domain it's used in. Couldn't figure out how to get the origin (= protocol & domain) server side so the env variable was created.
Expand Down
12 changes: 0 additions & 12 deletions components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export const App = ({ Component, pageProps, router }) => {
const [appState, setAppState] = useState(appContext);
const mobile = useIsMobile();
const { doc, html, loading, loadingEnd, transition } = appState;
const templateTransition = transition === 'template';
const containerRef = useRef(null);
const { asPath } = router;

Expand Down Expand Up @@ -197,14 +196,6 @@ https://www.typescriptlang.org And this one too
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no, minimum-scale=1, maximum-scale=1, user-scalable=no"
/>
<script
dangerouslySetInnerHTML={{
__html: `
document.documentElement.classList.remove('no-js');
document.documentElement.classList.add('has-js');
`,
}}
/>
<link
as="font"
crossOrigin=""
Expand Down Expand Up @@ -254,7 +245,6 @@ https://www.typescriptlang.org And this one too
scrollLock={appState.scrollLock}
setScrollLock={setScrollLock}
setTransition={setTransition}
templateTransition={templateTransition}
transition={transition}
html={html}
/>
Expand All @@ -275,8 +265,6 @@ const AppMain = ({
setScrollLock,
setTransition,
transition,
templateTransition,
html,
}) => {
const { scroll } = useLocomotiveScroll();

Expand Down
2 changes: 1 addition & 1 deletion pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class MyDocument extends Document {

render() {
return (
<Html className="no-js is-loading">
<Html className="is-loading">
<Head />
<body>
<Main />
Expand Down

0 comments on commit 2c7a34f

Please sign in to comment.