This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** function that used as middleware ***/ | |
accessToken: async (name) => { | |
if (typeof document === "undefined") return ""; | |
let token = document.cookie | |
.split(";") | |
.filter((cookie) => cookie.startsWith("token"))[0]; | |
if (!token) { | |
const response = await fetch("/api/refresh", { method: "POST" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useRef, useState } from 'react'; | |
type Noop = () => void; | |
export const useOnceEffect = (effect: Noop | { (): Noop }) => { | |
const effectFn = useRef<Noop | { (): Noop }>(effect); | |
const destroyFn = useRef<void | Noop>(); | |
const effectCalled = useRef(false); | |
const rendered = useRef(false); | |
const [, setVal] = useState<number>(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ComponentType, | |
ForwardRefExoticComponent, | |
PropsWithoutRef, | |
RefAttributes, | |
createContext, | |
forwardRef, | |
useContext | |
} from 'react'; | |
// import { ComponentLike, isForwardRefComponent } from './react'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shared/api/contracts.ts | |
export type CompanyDetailed = { | |
id: string; | |
name: string; | |
type: 'outcome' | 'income'; | |
notes: string; | |
isLiked: boolean; | |
}; | |
// shared/api/api-company/thunks.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
SERIALIZED_INTERNAL_PROPERTIES_KEY, | |
type SerializedEntity, | |
} from '@mswjs/data/lib/db/Database'; | |
import { | |
DATABASE_INSTANCE, | |
ENTITY_TYPE, | |
PRIMARY_KEY, | |
type Entity, | |
type FactoryAPI, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ComponentType, | |
ForwardRefExoticComponent, | |
PropsWithoutRef, | |
RefAttributes, | |
createContext, | |
forwardRef, | |
useContext | |
} from 'react'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shared/lib/notification/core.ts | |
import { | |
cleanNotifications, | |
cleanNotificationsQueue, | |
hideNotification, | |
showNotification, | |
updateNotification, | |
updateNotificationsState, | |
NotificationsStore, | |
NotificationData, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/next-redux-wrapper/.DS_Store b/node_modules/next-redux-wrapper/.DS_Store | |
new file mode 100644 | |
index 0000000..5008ddf | |
Binary files /dev/null and b/node_modules/next-redux-wrapper/.DS_Store differ | |
diff --git a/node_modules/next-redux-wrapper/es6/index.d.ts b/node_modules/next-redux-wrapper/es6/index.d.ts | |
index 66c1548..181cf6d 100644 | |
--- a/node_modules/next-redux-wrapper/es6/index.d.ts | |
+++ b/node_modules/next-redux-wrapper/es6/index.d.ts | |
@@ -1,6 +1,6 @@ | |
/// <reference types="node" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
DefaultError, | |
QueryClient, | |
QueryKey, | |
QueryObserver, | |
QueryObserverResult, | |
UseBaseQueryOptions, | |
UseQueryOptions, | |
notifyManager, | |
} from '@tanstack/react-query'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shared/lib/notifications/core.ts ////////////////////////////////////////////// | |
import { | |
NotificationData, | |
NotificationsStore, | |
cleanNotifications, | |
cleanNotificationsQueue, | |
hideNotification, | |
showNotification, | |
updateNotification, | |
updateNotificationsState, |
OlderNewer