Skip to content

Instantly share code, notes, and snippets.

@somedaycode
somedaycode / _app.js
Created November 20, 2022 18:13 — forked from claus/_app.js
Restore scroll position after navigating via browser back/forward buttons in Next.js
import useScrollRestoration from "utils/hooks/useScrollRestoration";
const App = ({ Component, pageProps, router }) => {
useScrollRestoration(router);
return <Component {...pageProps} />;
};
export default App;
@somedaycode
somedaycode / baek_10757.js
Last active January 6, 2021 12:33
코드스쿼드_알고리즘_week1
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
const input = [];
rl.on('line', function (line) {
input.push(line.split(' '));