-
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.
Merge branch 'main' into feature/pricing-table
- Loading branch information
Showing
12 changed files
with
203 additions
and
35 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
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 |
---|---|---|
@@ -1,27 +1,35 @@ | ||
import { createContext, useContext } from 'react'; | ||
import { createContext, useContext, useEffect } from 'react'; | ||
import AVSService from './AVSService'; | ||
import EigenLayerService from './EigenLayerService'; | ||
import LRTService from './LRTService'; | ||
import OperatorService from './OperatorService'; | ||
import RestakingDashboardService from './RestakingDashboardService'; | ||
import { useSession } from '@clerk/clerk-react'; | ||
|
||
export const ServiceContext = createContext(); | ||
|
||
// eslint-disable-next-line react-refresh/only-export-components | ||
export const useServices = () => useContext(ServiceContext); | ||
|
||
export function ServiceProvider({ children }) { | ||
const { session } = useSession(); | ||
|
||
useEffect(() => { | ||
context.session = session; | ||
}, [session]); | ||
|
||
return ( | ||
<ServiceContext.Provider value={services}> | ||
{children} | ||
</ServiceContext.Provider> | ||
); | ||
} | ||
|
||
const context = {}; | ||
const services = { | ||
avsService: new AVSService(), | ||
lrtService: new LRTService(), | ||
operatorService: new OperatorService(), | ||
eigenlayerService: new EigenLayerService(), | ||
rdService: new RestakingDashboardService() | ||
avsService: new AVSService(context), | ||
lrtService: new LRTService(context), | ||
operatorService: new OperatorService(context), | ||
eigenlayerService: new EigenLayerService(context), | ||
rdService: new RestakingDashboardService(context) | ||
}; |
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,55 @@ | ||
import { Link } from 'react-router-dom'; | ||
import { SignIn } from '@clerk/clerk-react'; | ||
|
||
export default function Login() { | ||
return ( | ||
<div className="flex h-full flex-col items-center justify-center gap-y-9"> | ||
<div className="flex flex-col gap-y-4 text-center"> | ||
<h1 className="font-display text-3xl font-normal text-foreground-1"> | ||
Login | ||
</h1> | ||
<p className="text-foreground-2"> | ||
Let's sign in to your account or if you don't have one, sign up | ||
</p> | ||
</div> | ||
<div className="flex flex-col items-center justify-center rounded-xl border border-outline bg-content1"> | ||
<SignIn | ||
appearance={{ | ||
layout: { | ||
socialButtonsPlacement: 'bottom' | ||
}, | ||
elements: { | ||
rootBox: 'lg:w-[31rem]', | ||
cardBox: 'lg:w-[31rem]', | ||
card: 'bg-content1 px-5', | ||
headerTitle: | ||
'text-foreground-1 text-3xl font-display font-normal', | ||
headerSubtitle: 'hidden', | ||
socialButtons: 'border rounded-md border-outline py-2', | ||
socialButtonsBlockButtonText__google: 'text-foreground-2', | ||
dividerLine: 'bg-outline', | ||
formFieldLabel: 'text-foreground-1', | ||
formFieldInput: | ||
'bg-transparent !border !border-outline text-white px-4 py-4 focus:!border-foreground-1', | ||
formFieldInputShowPasswordButton: 'text-foreground-2', | ||
formButtonPrimary: | ||
'!border bg-transparent text-secondary after:!bg-none after:border py-3 after:border-secondary hover:bg-content1 hover:border hover:border-focus hover:text-focus', | ||
footer: 'hidden', | ||
footerAction: 'bg-content1', | ||
otpCodeFieldInput: '!border !border-outline text-white', | ||
formResendCodeLink: 'text-foreground-2', | ||
backLink: 'text-foreground-2' | ||
} | ||
}} | ||
/> | ||
<p className="mb-2 text-foreground-2">Don't have an account?</p> | ||
<Link | ||
className="mb-7 cursor-pointer text-foreground-1 hover:underline" | ||
to={'/register'} | ||
> | ||
Create account | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.