Skip to content

Commit

Permalink
Merge pull request #671 from vselvarajijay/hexagonal
Browse files Browse the repository at this point in the history
+ init react-hook
  • Loading branch information
vselvarajijay authored Jun 10, 2024
2 parents 92e06f4 + 294ae0d commit 08fc1aa
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
15 changes: 14 additions & 1 deletion apps/registry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,29 @@ RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
COPY ./apps/registry /apps/registry
COPY ./.env /apps/registry/.env.local
COPY ./microservices /microservices
COPY ./packages /packages


# build packages
WORKDIR /microservices/account/packages/account
RUN rm -rf dist
RUN rm -rf node_modules
RUN pnpm i
RUN pnpm build:lib

WORKDIR /apps/registry
WORKDIR /packages/npm-core
RUN rm -rf dist
RUN rm -rf node_modules
RUN pnpm i
RUN pnpm build:lib

WORKDIR /packages/npm-react-hook
RUN rm -rf dist
RUN rm -rf node_modules
RUN pnpm i
RUN pnpm build:lib

WORKDIR /apps/registry
RUN rm -rf node_modules
RUN pnpm i

Expand Down
2 changes: 2 additions & 0 deletions apps/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
},
"devDependencies": {
"@akello/account": "link:../../microservices/account/packages/account",
"@akello/core": "link:../../packages/npm-core",
"@akello/react-hook": "link:../../packages/npm-react-hook",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
Expand Down
15 changes: 6 additions & 9 deletions apps/registry/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/registry/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AkelloClient } from '@akello/core'

const config = {
baseUrl: import.meta.env.VITE_API,
accountServiceUrl: import.meta.env.VITE_API,
cognitoUserPoolId: import.meta.env.VITE_AWS_COGNITO_USERPOOL_ID,
cognitoClientId: import.meta.env.VITE_AWS_COGNITO_APP_CLIENT_ID,
...(import.meta.env.VITE_AKELLO_COGNITO_URL && {
Expand Down
12 changes: 8 additions & 4 deletions apps/registry/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import { Authenticator } from '@aws-amplify/ui-react';
// import { akello } from './client.ts'
import { akello } from './client.ts'
import { BrowserRouter } from 'react-router-dom';
import { Amplify } from 'aws-amplify';
import { AkelloProvider } from '@akello/react-hook'



Amplify.configure({
Expand Down Expand Up @@ -36,9 +38,11 @@ Amplify.configure({
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<BrowserRouter>
<Authenticator.Provider>
<App isPassedToWithAuthenticator={true} />
</Authenticator.Provider>
<AkelloProvider akello={akello}>
<Authenticator.Provider>
<App isPassedToWithAuthenticator={true} />
</Authenticator.Provider>
</AkelloProvider>
</BrowserRouter>
</React.StrictMode>,
)

0 comments on commit 08fc1aa

Please sign in to comment.