1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Commit Graph

5 Commits

Author SHA1 Message Date
Kevin Heis
04f38e4779 Parse color_mode cookie in browser (#29738)
* Parse color_mode cookie in browser

* Update useTheme.ts

* Update use-theme.js

* Update use-theme.js

* Add support for dark_high_contrast

Per https://primer.style/css/support/theming

I also checked all the color mode options, this is the only additional working with Primer 20 so far

* Remove gray bg

* Remove  type

* Use defaults instead of types for fn args

* Thicker types
2022-08-09 16:48:18 +00:00
Peter Bengtsson
bf020344c2 let session defaults be defined where they are used (#29724) 2022-08-08 17:17:11 +00:00
Peter Bengtsson
623a040851 use defaultfallback data for apisession (#29719)
* don't get available languages from session

* update useSession

* one more fix

* use default session till XHR comes in

* warn on error
2022-08-08 15:47:55 +00:00
Peter Bengtsson
a1e3866fa5 don't get available languages from session (#29715)
* don't get available languages from session

* update useSession

* one more fix
2022-08-08 11:13:27 -04:00
Kevin Heis
56aa9ea094 Move use session to its own hook file (#29641)
* Move use session to its own hook file

* Trying useSWR

* Try one hour html cache

* blah blah lint

* Update to include loading state

* Update components/hooks/useSession.ts

Co-authored-by: Peter Bengtsson <peterbe@github.com>

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-05 14:47:10 +00:00