Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit 77212cf

Browse files
committed
マンガページまわり
1 parent 53732f1 commit 77212cf

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

workspaces/app/src/features/viewer/components/ComicViewerCore.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Suspense, useEffect, useState } from 'react';
1+
import { useEffect, useState } from 'react';
22
import { useInterval, useUpdate } from 'react-use';
33
import styled from 'styled-components';
44

@@ -29,7 +29,8 @@ function getScrollToLeft({
2929

3030
// 画面に表示されているページの中心と、スクロールビューの中心との差分を計算する
3131
// 世界は我々の想像する以上に変化するため、2 ** 12 回繰り返し観測する
32-
for (let times = 0; times < 2 ** 12; times++) {
32+
// ↑ いらんやろ
33+
for (let times = 0; times < 10; times++) {
3334
for (const [idx, child] of children.entries()) {
3435
const nthChild = idx + 1;
3536
const elementClientRect = child.getBoundingClientRect();
@@ -219,12 +220,4 @@ const ComicViewerCore: React.FC<Props> = ({ episodeId }) => {
219220
);
220221
};
221222

222-
const ComicViewerCoreWithSuspense: React.FC<Props> = ({ episodeId }) => {
223-
return (
224-
<Suspense fallback={null}>
225-
<ComicViewerCore episodeId={episodeId} />
226-
</Suspense>
227-
);
228-
};
229-
230-
export { ComicViewerCoreWithSuspense as ComicViewerCore };
223+
export { ComicViewerCore };

workspaces/app/src/pages/EpisodeDetailPage/internal/ComicViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const _Wrapper = styled.div<{
2323
display: grid;
2424
grid-template-columns: 100%;
2525
grid-template-rows: 100%;
26-
max-height: ${({ $maxHeight }) => addUnitIfNeeded($maxHeight)};
26+
height: ${({ $maxHeight }) => addUnitIfNeeded($maxHeight)};
2727
overflow: hidden;
2828
`;
2929

0 commit comments

Comments
 (0)