Skip to content

Commit

Permalink
Merge pull request #67 from sagaarr/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Shruti3004 authored Apr 19, 2022
2 parents 46c707e + d15ca39 commit 05309cf
Show file tree
Hide file tree
Showing 14 changed files with 524 additions and 445 deletions.
4 changes: 2 additions & 2 deletions packages/classes/modulefederation.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = {
name: "classes",
exposes: {
"./App": "./src/App",
"./MyClassRoute": "./src/pages/MyClassRoute.js",
"./ClassDetails": "./src/pages/ClassDetails.js",
"./MyClassRoute": "./src/pages/MyClassRoute/index.js",
"./ClassDetails": "./src/pages/ClassDetails/index.js",
},
remotes: {
core: `core@[window.appModules.core.url]/moduleEntry.js`,
Expand Down
5 changes: 3 additions & 2 deletions packages/classes/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import { extendTheme, NativeBaseProvider } from "native-base";
import { DEFAULT_THEME } from "@shiksha/common-lib";
import ClassDetails from "./pages/ClassDetails";
import MyClassRoute from "pages/MyClassRoute";
import { navigationRoutes } from "services/routes";

function App() {
const theme = extendTheme(DEFAULT_THEME);
return (
<NativeBaseProvider theme={theme}>
<Router basename={process.env.PUBLIC_URL}>
<Routes>
<Route path="my-classes/:classId" element={<ClassDetails />} />
<Route path="*" element={<MyClassRoute />} />
<Route path={navigationRoutes.myClasses} element={<ClassDetails />} />
<Route path={navigationRoutes.fourOfour} element={<MyClassRoute />} />
</Routes>
</Router>
</NativeBaseProvider>
Expand Down
9 changes: 9 additions & 0 deletions packages/classes/src/atoms/ButtonHOC.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'
import { Button } from "native-base";

const ButtonHOC = ({children, ...rest}) => {

return <Button {...rest}>{children}</Button>
}

export default ButtonHOC
9 changes: 9 additions & 0 deletions packages/classes/src/atoms/LinkHOC.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'
import { Link, useParams } from "react-router-dom";

const LinkHOC = ({children, ...rest}) => {

return <Link {...rest}>{children}</Link>
}

export default LinkHOC
Loading

0 comments on commit 05309cf

Please sign in to comment.