MCPcopy Create free account
hub / github.com/emwalker/digraph / UserSettings

Function UserSettings

client/src/components/UserSettings/index.tsx:20–51  ·  view source on GitHub ↗
(props: Props)

Source from the content-addressed store, hash-verified

18}
19
20function 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
53export default ({ view, match }: Props) => (
54 view

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected