(props: Props)
| 18 | } |
| 19 | |
| 20 | function UserSettings(props: Props) { |
| 21 | const view = useFragment( |
| 22 | graphql` |
| 23 | fragment UserSettings_view on View { |
| 24 | viewer { |
| 25 | isGuest |
| 26 | } |
| 27 | |
| 28 | ...Account_view |
| 29 | } |
| 30 | `, |
| 31 | props.view, |
| 32 | ) |
| 33 | const viewer = view.viewer |
| 34 | |
| 35 | useEffect(() => { |
| 36 | if (!viewer?.isGuest) return |
| 37 | document.location.replace('/') |
| 38 | }, [viewer]) |
| 39 | |
| 40 | if (viewer?.isGuest) return null |
| 41 | |
| 42 | useDocumentTitle('Settings | Digraph') |
| 43 | |
| 44 | return ( |
| 45 | <Page> |
| 46 | <Sidenav match={props.match} /> |
| 47 | <Account match={props.match} view={view} /> |
| 48 | <Support match={props.match} /> |
| 49 | </Page> |
| 50 | ) |
| 51 | } |
| 52 | |
| 53 | export default ({ view, match }: Props) => ( |
| 54 | view |
nothing calls this directly
no outgoing calls
no test coverage detected