Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
cea16fac
Unverified
Commit
cea16fac
authored
Aug 08, 2022
by
XQ
Committed by
GitHub
Aug 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove `useAppContext` in dialog props
parent
7e994c8f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
13 deletions
+6
-13
ArchivedMemoDialog.tsx
web/src/components/ArchivedMemoDialog.tsx
+0
-1
DailyReviewDialog.tsx
web/src/components/DailyReviewDialog.tsx
+0
-1
BaseDialog.tsx
web/src/components/Dialog/BaseDialog.tsx
+6
-9
ResourcesDialog.tsx
web/src/components/ResourcesDialog.tsx
+0
-1
SettingDialog.tsx
web/src/components/SettingDialog.tsx
+0
-1
No files found.
web/src/components/ArchivedMemoDialog.tsx
View file @
cea16fac
...
@@ -66,7 +66,6 @@ export default function showArchivedMemoDialog(): void {
...
@@ -66,7 +66,6 @@ export default function showArchivedMemoDialog(): void {
generateDialog
(
generateDialog
(
{
{
className
:
"archived-memo-dialog"
,
className
:
"archived-memo-dialog"
,
useAppContext
:
true
,
},
},
ArchivedMemoDialog
,
ArchivedMemoDialog
,
{}
{}
...
...
web/src/components/DailyReviewDialog.tsx
View file @
cea16fac
...
@@ -113,7 +113,6 @@ export default function showDailyReviewDialog(datestamp: DateStamp = Date.now())
...
@@ -113,7 +113,6 @@ export default function showDailyReviewDialog(datestamp: DateStamp = Date.now())
generateDialog
(
generateDialog
(
{
{
className
:
"daily-review-dialog"
,
className
:
"daily-review-dialog"
,
useAppContext
:
true
,
},
},
DailyReviewDialog
,
DailyReviewDialog
,
{
currentDateStamp
:
datestamp
}
{
currentDateStamp
:
datestamp
}
...
...
web/src/components/Dialog/BaseDialog.tsx
View file @
cea16fac
...
@@ -6,7 +6,6 @@ import "../../less/base-dialog.less";
...
@@ -6,7 +6,6 @@ import "../../less/base-dialog.less";
interface
DialogConfig
{
interface
DialogConfig
{
className
:
string
;
className
:
string
;
useAppContext
?:
boolean
;
clickSpaceDestroy
?:
boolean
;
clickSpaceDestroy
?:
boolean
;
}
}
...
@@ -61,16 +60,14 @@ export function generateDialog<T extends DialogProps>(
...
@@ -61,16 +60,14 @@ export function generateDialog<T extends DialogProps>(
destroy
:
cbs
.
destroy
,
destroy
:
cbs
.
destroy
,
}
as
T
;
}
as
T
;
let
Fragment
=
(
const
Fragment
=
(
<
Provider
store=
{
store
}
>
<
BaseDialog
destroy=
{
cbs
.
destroy
}
clickSpaceDestroy=
{
true
}
{
...
config
}
>
<
BaseDialog
destroy=
{
cbs
.
destroy
}
clickSpaceDestroy=
{
true
}
{
...
config
}
>
<
DialogComponent
{
...
dialogProps
}
/>
<
DialogComponent
{
...
dialogProps
}
/>
</
BaseDialog
>
</
BaseDialog
>
</
Provider
>
);
);
if
(
config
.
useAppContext
)
{
Fragment
=
<
Provider
store=
{
store
}
>
{
Fragment
}
</
Provider
>;
}
dialog
.
render
(
Fragment
);
dialog
.
render
(
Fragment
);
return
cbs
;
return
cbs
;
...
...
web/src/components/ResourcesDialog.tsx
View file @
cea16fac
...
@@ -155,7 +155,6 @@ export default function showResourcesDialog() {
...
@@ -155,7 +155,6 @@ export default function showResourcesDialog() {
generateDialog
(
generateDialog
(
{
{
className
:
"resources-dialog"
,
className
:
"resources-dialog"
,
useAppContext
:
true
,
},
},
ResourcesDialog
,
ResourcesDialog
,
{}
{}
...
...
web/src/components/SettingDialog.tsx
View file @
cea16fac
...
@@ -80,7 +80,6 @@ export default function showSettingDialog(): void {
...
@@ -80,7 +80,6 @@ export default function showSettingDialog(): void {
generateDialog
(
generateDialog
(
{
{
className
:
"setting-dialog"
,
className
:
"setting-dialog"
,
useAppContext
:
true
,
},
},
SettingDialog
,
SettingDialog
,
{}
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment