Repository navigation
feat(pages): public pages, and thumbnails in link unfurls #7570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
190022e
676d208
ee24460
a032d97
c74deae
df0a4bb
a9caea2
225b19d
5b1a93a
ebcf8de
905bd62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,15 +16,18 @@ export function PageDetailView({ slug }: PageDetailViewProps) { | |||||
| const { t } = useLingui(); | ||||||
| const navigate = useNavigate(); | ||||||
| const [commentsEnabled, setCommentsEnabled] = useState(false); | ||||||
| const [previewVersion, setPreviewVersion] = useState<number | null>(null); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Reset
Suggested change
🤖 Prompt for AI Agents |
||||||
| const { | ||||||
| page, | ||||||
| versions, | ||||||
| threads, | ||||||
| currentUserId, | ||||||
| onSetVisibility, | ||||||
| onSetSharedVersion, | ||||||
| onRename, | ||||||
| onRefresh, | ||||||
| onDelete, | ||||||
| } = usePageHeaderData({ slug }); | ||||||
| } = usePageHeaderData({ slug, version: previewVersion }); | ||||||
|
|
||||||
| const goBack = () => navigate({ to: "/pages" }); | ||||||
|
|
||||||
|
|
@@ -61,6 +64,12 @@ export function PageDetailView({ slug }: PageDetailViewProps) { | |||||
| } | ||||||
| onSetVisibility={onSetVisibility} | ||||||
| onSetSharedVersion={onSetSharedVersion} | ||||||
| onRename={onRename} | ||||||
| onRefresh={onRefresh} | ||||||
| onPreviewVersion={setPreviewVersion} | ||||||
| previewVersion={ | ||||||
| previewVersion === page.servedVersion ? null : previewVersion | ||||||
| } | ||||||
| onDelete={async () => { | ||||||
| await onDelete(); | ||||||
| goBack(); | ||||||
|
|
@@ -76,6 +85,7 @@ export function PageDetailView({ slug }: PageDetailViewProps) { | |||||
| <PageViewer | ||||||
| key={slug} | ||||||
| slug={slug} | ||||||
| version={previewVersion} | ||||||
| commentsEnabled={commentsEnabled} | ||||||
| onCommentsEnabledChange={setCommentsEnabled} | ||||||
| /> | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.