mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 18:25:41 +03:00
Undo "Experiment: make replies container not whole-clickable"
This commit is contained in:
parent
76823b8497
commit
d36ea02a02
1 changed files with 35 additions and 25 deletions
|
@ -843,24 +843,24 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
weight,
|
weight,
|
||||||
} = status;
|
} = status;
|
||||||
const isHero = statusID === id;
|
const isHero = statusID === id;
|
||||||
const StatusParent = useCallback(
|
// const StatusParent = useCallback(
|
||||||
(props) =>
|
// (props) =>
|
||||||
isThread || thread || ancestor ? (
|
// isThread || thread || ancestor ? (
|
||||||
<Link
|
// <Link
|
||||||
class="status-link"
|
// class="status-link"
|
||||||
to={
|
// to={
|
||||||
instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`
|
// instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`
|
||||||
}
|
// }
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
resetScrollPosition(statusID);
|
// resetScrollPosition(statusID);
|
||||||
}}
|
// }}
|
||||||
{...props}
|
// {...props}
|
||||||
/>
|
// />
|
||||||
) : (
|
// ) : (
|
||||||
<div class="status-focus" tabIndex={0} {...props} />
|
// <div class="status-focus" tabIndex={0} {...props} />
|
||||||
),
|
// ),
|
||||||
[isThread, thread],
|
// [isThread, thread],
|
||||||
);
|
// );
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={statusID}
|
key={statusID}
|
||||||
|
@ -941,7 +941,16 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<StatusParent>
|
// <StatusParent>
|
||||||
|
<Link
|
||||||
|
class="status-link"
|
||||||
|
to={
|
||||||
|
instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`
|
||||||
|
}
|
||||||
|
onClick={() => {
|
||||||
|
resetScrollPosition(statusID);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Status
|
<Status
|
||||||
statusID={statusID}
|
statusID={statusID}
|
||||||
instance={instance}
|
instance={instance}
|
||||||
|
@ -969,7 +978,8 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)} */}
|
)} */}
|
||||||
</StatusParent>
|
{/* </StatusParent> */}
|
||||||
|
</Link>
|
||||||
)}
|
)}
|
||||||
{descendant && replies?.length > 0 && (
|
{descendant && replies?.length > 0 && (
|
||||||
<SubComments
|
<SubComments
|
||||||
|
@ -1184,14 +1194,14 @@ function SubComments({
|
||||||
<ul>
|
<ul>
|
||||||
{replies.map((r) => (
|
{replies.map((r) => (
|
||||||
<li key={r.id}>
|
<li key={r.id}>
|
||||||
{/* <Link
|
<Link
|
||||||
class="status-link"
|
class="status-link"
|
||||||
to={instance ? `/${instance}/s/${r.id}` : `/s/${r.id}`}
|
to={instance ? `/${instance}/s/${r.id}` : `/s/${r.id}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
resetScrollPosition(r.id);
|
resetScrollPosition(r.id);
|
||||||
}}
|
}}
|
||||||
> */}
|
>
|
||||||
<div class="status-focus" tabIndex={0}>
|
{/* <div class="status-focus" tabIndex={0}> */}
|
||||||
<Status
|
<Status
|
||||||
statusID={r.id}
|
statusID={r.id}
|
||||||
instance={instance}
|
instance={instance}
|
||||||
|
@ -1208,8 +1218,8 @@ function SubComments({
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
{/* </div> */}
|
||||||
{/* </Link> */}
|
</Link>
|
||||||
{r.replies?.length && (
|
{r.replies?.length && (
|
||||||
<SubComments
|
<SubComments
|
||||||
instance={instance}
|
instance={instance}
|
||||||
|
|
Loading…
Reference in a new issue