Skip to content

Commit

Permalink
fix(eslint): consistent-return disabled, updated yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
juunie-roh committed Jun 24, 2024
1 parent 2e4813d commit 7eef0e9
Show file tree
Hide file tree
Showing 7 changed files with 340 additions and 330 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
],
// Custom Options:
"no-param-reassign": "off",
"no-underscore-dangle": "off"
"no-underscore-dangle": "off",
"consistent-return": "off"
}
},
// Configuration for testing
Expand Down
626 changes: 313 additions & 313 deletions .yarn/releases/yarn-4.2.2.cjs → .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ packageExtensions:
dependencies:
inquirer: latest

yarnPath: .yarn/releases/yarn-4.2.2.cjs
yarnPath: .yarn/releases/yarn-4.3.1.cjs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@
"main"
]
},
"packageManager": "yarn@4.2.2"
"packageManager": "yarn@4.3.1"
}
2 changes: 1 addition & 1 deletion src/.next/cache/eslint/.cache_8hexeq

Large diffs are not rendered by default.

33 changes: 21 additions & 12 deletions src/app/techrecord/(pages)/slider/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export default function Slider() {
const onmousemove = (e: MouseEvent): void => {
if (dragging) {
const containerRect = container.getBoundingClientRect();
const newPosition = ((e.clientX - containerRect.left) / containerRect.width) * 100;
const newPosition =
((e.clientX - containerRect.left) / containerRect.width) * 100;

left.style.flex = `0 0 ${newPosition}%`;
right.style.flex = `0 0 ${100 - newPosition}%`;
Expand All @@ -58,21 +59,25 @@ export default function Slider() {
return (
<div ref={containerRef} className={styles.container}>
{/* Left Div */}
<div ref={leftRef} className={styles.content} style={{ flex: added ? '0 0 50%' : '0 0 100%' }}>
<div
ref={leftRef}
className={styles.content}
style={{ flex: added ? '0 0 50%' : '0 0 100%' }}
>
LEFT CONTENT
<div className={styles.buttons}>
<button
type='button'
onClick={() =>
<button
type="button"
onClick={() =>
setAdded((_added) => {
const right = rightRef.current;
if (!right) return _added;
if (!_added) {
right.style.flex = `0 0 50%`;
}
return !_added;
}
)}
})
}
>
{added ? 'CLOSE' : 'OPEN'}
</button>
Expand All @@ -82,20 +87,24 @@ export default function Slider() {

{/* Slider */}
<div
role='none'
role="none"
className={styles.slider}
onMouseDown={(e) => e.preventDefault()}
style={{ display: added ? 'block' : 'none' }}
>
<div ref={sliderRef} />
<div ref={sliderRef} />
</div>
{/* Slider */}

{/* Right Div */}
<div ref={rightRef} className={styles.content} style={{ display: added ? 'flex' : 'none' }}>
<div
ref={rightRef}
className={styles.content}
style={{ display: added ? 'flex' : 'none' }}
>
RIGHT CONTENT
</div>
{/* Right Div */}
</div>
)
}
);
}
2 changes: 1 addition & 1 deletion src/app/techrecord/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const menus = [
href: 'techrecord/slider',
ctgry: 'react',
key: 7,
}
},
];

export const metadata: Metadata = {
Expand Down

0 comments on commit 7eef0e9

Please sign in to comment.