This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fasih Ali
authored and
Fasih Ali
committed
Nov 9, 2023
1 parent
ddc03f5
commit 43ebd6f
Showing
15 changed files
with
66 additions
and
143 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ export default defineConfig({ | |
'swiper', | ||
], | ||
}, | ||
minify: true, | ||
minify: false, | ||
}, | ||
|
||
test: { | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './lib/use-custom-link/use-custom-link'; | ||
export * from './lib/use-build-variant'; | ||
export * from './lib/use-navigation'; | ||
export * from './lib/use-shared-link'; |
63 changes: 0 additions & 63 deletions
63
libs/hooks/src/lib/use-custom-link/use-custom-link.spec.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { SharedLinkContext } from '@deriv-com/providers'; | ||
import { useContext } from 'react'; | ||
|
||
export const useSharedLink = () => { | ||
return useContext(SharedLinkContext); | ||
}; |
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './lib/build-variant'; | ||
export * from './lib/navigation'; | ||
export * from './lib/shared-link-provider'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './shared-link-provider.context'; | ||
export * from './shared-link-provider.provider'; | ||
export * from './types'; |
6 changes: 6 additions & 0 deletions
6
libs/providers/src/lib/shared-link-provider/shared-link-provider.context.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
import { SharedLinkContextValue } from './types'; | ||
|
||
export const SharedLinkContext = React.createContext<SharedLinkContextValue>({ | ||
DerivLink: (props) => <a {...props} />, | ||
}); |
Empty file.
17 changes: 17 additions & 0 deletions
17
libs/providers/src/lib/shared-link-provider/shared-link-provider.provider.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ReactNode } from 'react'; | ||
import { SharedLink } from './types'; | ||
import { SharedLinkContext } from './shared-link-provider.context'; | ||
|
||
export const SharedLinkProvider = ({ | ||
children, | ||
DerivLink, | ||
}: { | ||
DerivLink: SharedLink; | ||
children: ReactNode; | ||
}) => { | ||
return ( | ||
<SharedLinkContext.Provider value={{ DerivLink }}> | ||
{children} | ||
</SharedLinkContext.Provider> | ||
); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React, { AnchorHTMLAttributes } from 'react'; | ||
|
||
export interface SharedLinkProps | ||
extends AnchorHTMLAttributes<HTMLAnchorElement> { | ||
fasih?: string; | ||
} | ||
export type SharedLink = React.FC<SharedLinkProps>; | ||
|
||
export interface SharedLinkContextValue { | ||
DerivLink: SharedLink; | ||
} |