ソースを参照

[fix] page options dialog (#302)

* fix rename pages

* Update sponsors.ts
main
Steve Ruiz 3年前
コミット
67a7935cfc
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 1
- 1
apps/www/pages/api/sponsors.ts ファイルの表示

@@ -51,7 +51,7 @@ export default async function GetSponsors(req: NextApiRequest, res: NextApiRespo
51 51
   const results = (
52 52
     sponsorInfo.data.viewer.sponsorshipsAsMaintainer.edges as QueryResult[]
53 53
   ).map<SponsorResult>((edge) => ({
54
-    url: edge.node.sponsorEntity.avatarUrl?.replaceAll('&', '&amp;') ?? '',
54
+    url: edge.node.sponsorEntity.avatarUrl?.replace(/&/g, '&amp;') ?? '',
55 55
     login: edge.node.sponsorEntity.login,
56 56
   }))
57 57
 

+ 1
- 0
packages/tldraw/src/components/TopPanel/PageMenu/PageMenu.tsx ファイルの表示

@@ -9,6 +9,7 @@ import { DMContent, DMDivider } from '~components/Primitives/DropdownMenu'
9 9
 import { SmallIcon } from '~components/Primitives/SmallIcon'
10 10
 import { RowButton } from '~components/Primitives/RowButton'
11 11
 import { ToolButton } from '~components/Primitives/ToolButton'
12
+import { preventEvent } from '~components/preventEvent'
12 13
 
13 14
 const sortedSelector = (s: TDSnapshot) =>
14 15
   Object.values(s.document.pages).sort((a, b) => (a.childIndex || 0) - (b.childIndex || 0))

+ 6
- 2
packages/tldraw/src/components/TopPanel/PageOptionsDialog/PageOptionsDialog.tsx ファイルの表示

@@ -9,6 +9,7 @@ import { Divider } from '~components/Primitives/Divider'
9 9
 import { IconButton } from '~components/Primitives/IconButton/IconButton'
10 10
 import { SmallIcon } from '~components/Primitives/SmallIcon'
11 11
 import { breakpoints } from '~components/breakpoints'
12
+import { preventEvent } from '~components/preventEvent'
12 13
 
13 14
 const canDeleteSelector = (s: TDSnapshot) => {
14 15
   return Object.keys(s.document.pages).length > 1
@@ -134,9 +135,12 @@ export const StyledDialogOverlay = styled(Dialog.Overlay, {
134 135
   height: '100%',
135 136
 })
136 137
 
137
-function DialogAction({ ...rest }: RowButtonProps & { onSelect: (e: Event) => void }) {
138
+function DialogAction({
139
+  onSelect,
140
+  ...rest
141
+}: RowButtonProps & { onSelect: (e: React.SyntheticEvent<HTMLButtonElement, Event>) => void }) {
138 142
   return (
139
-    <Dialog.Action asChild>
143
+    <Dialog.Action asChild onClick={onSelect} onSelect={onSelect}>
140 144
       <RowButton {...rest} />
141 145
     </Dialog.Action>
142 146
   )

読み込み中…
キャンセル
保存