diff options
author | Vitaly Takmazov | 2023-05-31 06:10:51 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-05-31 06:11:05 +0300 |
commit | f2a7ea3af919548d41383734e8a3667086a44bcc (patch) | |
tree | e0d9db07956f10ccc4e27fc9e0d45d88950dbfbb /vnext/src/ui/VisitorContext.js | |
parent | 395185d093b2d6bb46d02830088e00a3a2ca20c1 (diff) |
eslint: enforce semicolons only before statement continuation chars
Diffstat (limited to 'vnext/src/ui/VisitorContext.js')
-rw-r--r-- | vnext/src/ui/VisitorContext.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vnext/src/ui/VisitorContext.js b/vnext/src/ui/VisitorContext.js index 240b709b..9740f9ca 100644 --- a/vnext/src/ui/VisitorContext.js +++ b/vnext/src/ui/VisitorContext.js @@ -1,18 +1,18 @@ -import { createContext, useContext, useState } from 'react'; +import { createContext, useContext, useState } from 'react' -const Visitor = createContext(); +const Visitor = createContext() /** @type {import('../api').SecureUser} */ const unknownUser = { uid: -1 -}; +} /** * @param { import('react').PropsWithChildren<{}> } props */ export function VisitorProvider({ children }) { - const state = useState(unknownUser); - return <Visitor.Provider value={state}>{children}</Visitor.Provider>; + const state = useState(unknownUser) + return <Visitor.Provider value={state}>{children}</Visitor.Provider> } /** @@ -23,9 +23,9 @@ export function VisitorProvider({ children }) { * ]} visitor hook */ export function useVisitor() { - const visitor = useContext(Visitor); + const visitor = useContext(Visitor) if (visitor === undefined) { - throw new Error('useVisitor must be used within a VisitorProvider'); + throw new Error('useVisitor must be used within a VisitorProvider') } - return visitor; + return visitor }
\ No newline at end of file |