-
Notifications
You must be signed in to change notification settings - Fork 29
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
1 parent
6678fa9
commit 6ebd2f3
Showing
17 changed files
with
1 addition
and
1,477 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,12 @@ | ||
import React from "react"; | ||
import { HashRouter, Route, Routes, Navigate } from "react-router-dom"; | ||
import ConfigScreen from "./Config"; | ||
import RTE from "./RTE"; | ||
|
||
/** HomeRedirectHandler - component to nandle redirect based on the window location pathname, | ||
as react Router does not identifies pathname if the app is rendered in an iframe. | ||
*/ | ||
const HomeRedirectHandler = function () { | ||
if (window?.location?.pathname !== "/") { | ||
return <Navigate to={{ pathname: window.location.pathname }} />; | ||
} | ||
return null; | ||
}; | ||
|
||
/* App - The main app component that should be rendered */ | ||
const App: React.FC = function () { | ||
// console.log("APP RENDERED") | ||
return ( | ||
<div> | ||
<ConfigScreen /> | ||
{/* <HashRouter> | ||
<Routes> | ||
<Route path="/" element={<HomeRedirectHandler />} /> | ||
<Route path="/rte" element={<RTE />} /> | ||
<Route path="/config" element={<ConfigScreen />} /> | ||
</Routes> | ||
</HashRouter> */} | ||
</div> | ||
); | ||
}; | ||
|
||
export default App; | ||
|
||
|
||
// contentstack web : url: http//localhost:3000 | ||
//when http://localhost:3000/rte -> fetch(`url/fetch`) -> js code -> state -> | ||
export default App; |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.