Add user invite codes (#393)
* Add mobile UIs for invite codes * Update invite code UIs for web * Finish implementing invite code behaviors (including notifications of invited users) * Bump deps * Update web right nav to use real data; also fix lint
This commit is contained in:
parent
8e28d3c6be
commit
ea04c2bd33
26 changed files with 932 additions and 246 deletions
13
src/lib/hooks/useCustomPalette.ts
Normal file
13
src/lib/hooks/useCustomPalette.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from 'react'
|
||||
import {useTheme} from 'lib/ThemeContext'
|
||||
import {choose} from 'lib/functions'
|
||||
|
||||
export function useCustomPalette<T>({light, dark}: {light: T; dark: T}) {
|
||||
const theme = useTheme()
|
||||
return React.useMemo(() => {
|
||||
return choose<T, Record<string, T>>(theme.colorScheme, {
|
||||
dark,
|
||||
light,
|
||||
})
|
||||
}, [theme.colorScheme, dark, light])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue