[fix] page options dialog (#302)
* fix rename pages * Update sponsors.ts
This commit is contained in:
parent
cd48b67a74
commit
67a7935cfc
3 changed files with 8 additions and 3 deletions
|
@ -51,7 +51,7 @@ export default async function GetSponsors(req: NextApiRequest, res: NextApiRespo
|
|||
const results = (
|
||||
sponsorInfo.data.viewer.sponsorshipsAsMaintainer.edges as QueryResult[]
|
||||
).map<SponsorResult>((edge) => ({
|
||||
url: edge.node.sponsorEntity.avatarUrl?.replaceAll('&', '&') ?? '',
|
||||
url: edge.node.sponsorEntity.avatarUrl?.replace(/&/g, '&') ?? '',
|
||||
login: edge.node.sponsorEntity.login,
|
||||
}))
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import { DMContent, DMDivider } from '~components/Primitives/DropdownMenu'
|
|||
import { SmallIcon } from '~components/Primitives/SmallIcon'
|
||||
import { RowButton } from '~components/Primitives/RowButton'
|
||||
import { ToolButton } from '~components/Primitives/ToolButton'
|
||||
import { preventEvent } from '~components/preventEvent'
|
||||
|
||||
const sortedSelector = (s: TDSnapshot) =>
|
||||
Object.values(s.document.pages).sort((a, b) => (a.childIndex || 0) - (b.childIndex || 0))
|
||||
|
|
|
@ -9,6 +9,7 @@ import { Divider } from '~components/Primitives/Divider'
|
|||
import { IconButton } from '~components/Primitives/IconButton/IconButton'
|
||||
import { SmallIcon } from '~components/Primitives/SmallIcon'
|
||||
import { breakpoints } from '~components/breakpoints'
|
||||
import { preventEvent } from '~components/preventEvent'
|
||||
|
||||
const canDeleteSelector = (s: TDSnapshot) => {
|
||||
return Object.keys(s.document.pages).length > 1
|
||||
|
@ -134,9 +135,12 @@ export const StyledDialogOverlay = styled(Dialog.Overlay, {
|
|||
height: '100%',
|
||||
})
|
||||
|
||||
function DialogAction({ ...rest }: RowButtonProps & { onSelect: (e: Event) => void }) {
|
||||
function DialogAction({
|
||||
onSelect,
|
||||
...rest
|
||||
}: RowButtonProps & { onSelect: (e: React.SyntheticEvent<HTMLButtonElement, Event>) => void }) {
|
||||
return (
|
||||
<Dialog.Action asChild>
|
||||
<Dialog.Action asChild onClick={onSelect} onSelect={onSelect}>
|
||||
<RowButton {...rest} />
|
||||
</Dialog.Action>
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue