Skip to content

Commit

Permalink
export local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
tlgimenes committed Aug 16, 2021
1 parent 85dd501 commit ee9eacd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions packages/store-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ export {
Context as SessionContext,
} from './session/Provider'
export type {
Actions as SessionActions,
Effects as SessionEffects,
InitialState as SessionInitialState,
Currency,
User,
} from './session/Provider'
export { useSession } from './session/useSession'

// Storage
export { useLocalStorage } from './storage/useLocalStorage'
2 changes: 1 addition & 1 deletion packages/store-sdk/src/session/Provider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createContext, useMemo } from 'react'
import type { FC } from 'react'

import { useLocalStorage } from '../utils/useLocalStorage'
import { useLocalStorage } from '../storage/useLocalStorage'

export interface Currency {
code: string // USD
Expand Down
3 changes: 1 addition & 2 deletions packages/store-sdk/src/session/useSession.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ContextValue } from './Provider'
import { Context } from './Provider'
import { useContext } from '../utils/useContext'

export const useSession = <T extends ContextValue>() => useContext(Context) as T
export const useSession = () => useContext(Context)

0 comments on commit ee9eacd

Please sign in to comment.