-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
9 changed files
with
105 additions
and
3 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { App } from './src/App' | ||
import { Contracts } from './src/contracts' | ||
import { ExtensionConfig, ExtensionInfo } from '../../shared/types' | ||
|
||
export const LunarPayExtension = (config: ExtensionConfig): ExtensionInfo => ({ | ||
Enabled: false, | ||
Name: 'LunarPay', | ||
Description: 'Payments made simple for WEB3 businesses.', | ||
Website: 'https://lunarpay.finance', | ||
Logo: { | ||
Light: '/images/extensions/lunarpay-logo.svg', | ||
Dark: '/images/extensions/lunarpay-logo.svg', | ||
}, | ||
Tags: ['defi'], | ||
Contracts: Contracts(config), | ||
AppRoot: App, | ||
WidgetRoots: {}, | ||
Developer: { | ||
Name: 'LunarPay', | ||
Website: 'https://lunarpay.finance', | ||
}, | ||
}) |
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,25 @@ | ||
import React from 'react' | ||
import { Tab } from '@headlessui/react' | ||
import { PayrollTab } from './payroll/PayrollTab' | ||
import { TabButton } from '../../../shared/ui/elements' | ||
import { faCoins } from '@fortawesome/free-solid-svg-icons' | ||
import { SubscriptionTab } from './subscription/SubscriptionTab' | ||
|
||
export const App = () => { | ||
return ( | ||
<Tab.Group> | ||
<Tab.List className="flex items-center space-x-2 md:space-x-4 mb-4"> | ||
<TabButton icon={faCoins}>Payroll</TabButton> | ||
<TabButton icon={faCoins}>Subscriptions</TabButton> | ||
</Tab.List> | ||
<Tab.Panels> | ||
<Tab.Panel> | ||
<PayrollTab /> | ||
</Tab.Panel> | ||
<Tab.Panel> | ||
<SubscriptionTab /> | ||
</Tab.Panel> | ||
</Tab.Panels> | ||
</Tab.Group> | ||
) | ||
} |
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 @@ | ||
export const Config = {} |
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,14 @@ | ||
import { Network, ExtensionScInfo, ExtensionConfig } from '../../../shared/types' | ||
|
||
const getContractAddress = (network: Network) => { | ||
if (network === 'devnet') return '#' | ||
if (network === 'testnet') return '#' | ||
return '#' | ||
} | ||
|
||
export const Contracts = (config: ExtensionConfig): ExtensionScInfo => ({ | ||
YourCustomScEndpoint: { | ||
Address: getContractAddress(config.network), | ||
Endpoint: 'yourCustomScEndpoint', | ||
}, | ||
}) |
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 from 'react' | ||
import { useApp } from '../../../../shared/hooks/useApp' | ||
import { AppSection } from '../../../../shared/ui/elements' | ||
|
||
export function PayrollTab() { | ||
const app = useApp() | ||
|
||
console.log(app) | ||
|
||
return <AppSection title="Payroll Section">Coming soon.</AppSection> | ||
} |
11 changes: 11 additions & 0 deletions
11
src/extensions/lunarpay/src/subscription/SubscriptionTab.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,11 @@ | ||
import React from 'react' | ||
import { useApp } from '../../../../shared/hooks/useApp' | ||
import { AppSection } from '../../../../shared/ui/elements' | ||
|
||
export function SubscriptionTab() { | ||
const app = useApp() | ||
|
||
console.log(app) | ||
|
||
return <AppSection title="Subscription Section">Coming soon.</AppSection> | ||
} |