Add back to summary button conditionally in EntryPage
This commit is contained in:
@@ -40,11 +40,15 @@ export default function EntryPage() {
|
|||||||
|
|
||||||
const quizLink = `/quiz?mode=entry&id=${encodeURIComponent(entry.id)}`;
|
const quizLink = `/quiz?mode=entry&id=${encodeURIComponent(entry.id)}`;
|
||||||
const ig = entry.ig_meta;
|
const ig = entry.ig_meta;
|
||||||
|
const fromSummary = Boolean(location.state && (location.state as any).fromSummary);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="entry-page">
|
<div className="entry-page">
|
||||||
<div className="crumbs row-between">
|
<div className="crumbs row-between">
|
||||||
<button className="button button--ghost" onClick={() => navigate(-1)}>← Back</button>
|
<button className="button button--ghost" onClick={() => navigate(-1)}>← Back</button>
|
||||||
|
{fromSummary && (
|
||||||
|
<button className="button button--ghost" onClick={() => navigate(-1)}>Back to summary</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="page-header">
|
<div className="page-header">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user