-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(share-summary): Share summary mutation (#8412)
* feat(share-summary): Add share topic button to meeting summary * renderLoader * Fix email render * Fix modal position * Fix scroll issue * Share topic mutation * Fix merge conflict * chore: add generic radix Dialog component * Move to ui, remove px * useDialog * Some customization * More customization * SimpleModalDialog * chore: add radix select * chore(share-summary): integration dropdown * Add slack connect button * Run yarn again * Add slack channel picker * Defaults * Update dialog composition * useDialogState * Remove simple modal * fix type * Update slack message * Snackbar * Update shadow * Update copy * Cursor pointer * Add topic url * More slack message data * tweaks * run yarn * Change imports * Tweak * revert useModalPortal changes * check if summary exists * better error handling * Handle slack limit * Remove console log * Fix types * tweak * Show topic name * Single character * View message button * Do not make query unless share button is clicked * Add loading indicator * add isLoading to SelectTrigger
- Loading branch information
1 parent
97c9d53
commit d5bcc37
Showing
17 changed files
with
463 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React, {Suspense, useCallback} from 'react' | ||
import {useHistory, useLocation} from 'react-router' | ||
import useRouter from '../hooks/useRouter' | ||
import ShareTopicModal from '~/components/ShareTopicModal' | ||
import {renderLoader} from '../utils/relay/renderLoader' | ||
import useQueryLoaderNow from '../hooks/useQueryLoaderNow' | ||
import shareTopicModalQuery, { | ||
ShareTopicModalQuery | ||
} from '../__generated__/ShareTopicModalQuery.graphql' | ||
|
||
const ShareTopicRouterRoot = () => { | ||
const {match} = useRouter<{stageId: string; meetingId: string}>() | ||
const {params} = match | ||
|
||
const {meetingId, stageId} = params | ||
|
||
const queryRef = useQueryLoaderNow<ShareTopicModalQuery>( | ||
shareTopicModalQuery, | ||
{meetingId}, | ||
'store-or-network' | ||
) | ||
|
||
const location = useLocation<{backgroundLocation?: Location}>() | ||
const history = useHistory() | ||
|
||
const onClose = useCallback(() => { | ||
const state = location.state | ||
history.replace(state?.backgroundLocation ?? `/new-summary/${meetingId}`) | ||
}, [location]) | ||
|
||
return ( | ||
<Suspense fallback={renderLoader()}> | ||
{queryRef && ( | ||
<ShareTopicModal | ||
stageId={stageId} | ||
meetingId={meetingId} | ||
isOpen={true} | ||
onClose={onClose} | ||
queryRef={queryRef} | ||
/> | ||
)} | ||
</Suspense> | ||
) | ||
} | ||
|
||
export default ShareTopicRouterRoot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.