Migrace na OpenAPI - TypeScript typy
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {DepartureTime} from "../../types";
|
||||
import { DepartureTime } from "../../types";
|
||||
|
||||
const TOKEN_KEY = "token";
|
||||
|
||||
@@ -16,8 +16,8 @@ export const storeToken = (token: string) => {
|
||||
*
|
||||
* @returns token nebo null
|
||||
*/
|
||||
export const getToken = (): string | null => {
|
||||
return localStorage.getItem(TOKEN_KEY);
|
||||
export const getToken = (): string | undefined => {
|
||||
return localStorage.getItem(TOKEN_KEY) ?? undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user