Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions ui/package-lock.json

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

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"eslint": "^8.17.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
Expand Down
11 changes: 10 additions & 1 deletion ui/src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import Header from "./components/Header/Header";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header is not getting used here. This should be removed from here.

import { Routes, Route } from "react-router-dom";


function App() {
return (
<div>Hey</div>
<Routes>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to a separate folder name Routes.

@pallabez What would be the homepage? As we are not focusing on the Login screen as of now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homepage would be dashboard. No?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, as we decided the login is not the priority right now then yes dashboard. We need to also highlight in UI till login is not their dashboard view is of the super user or non-super user.

<Route path="/" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would come at /? As of now, I can only see blank page

<Route path="/login" element={<Login />} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These components are not imported hence it is not working. only blank pages are coming.

image

<Route path="/flag?mode=edit" element={<FlagEdit />} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, the components have not imported.

<Route path="/flag?mode=create" element={<FlagCreate />} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the advantage here of the mode=create

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query would help us use same feature flag forum component to both edit & create as discussed before.



</Routes>
);
}

Expand Down
7 changes: 7 additions & 0 deletions ui/src/Components/FlagMode/FlagCreate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pallabez are we going to have separate components for edit and create?

Copy link
Contributor

@pallabez pallabez Jul 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. We were planning on reusing same component.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the component and route.


const FlagCreate = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using this pattern for component creation. Please check the button or header to follow the same pattern.

return <div>FlagCreate</div>;
};

export default FlagCreate;
7 changes: 7 additions & 0 deletions ui/src/Components/FlagMode/FlagEdit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

const FlagEdit = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using this pattern for component creation. Please check the button or header to follow the same pattern.

return <div>FlagEdit</div>;
};

export default FlagEdit;
5 changes: 5 additions & 0 deletions ui/src/Components/Login/Login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";

export const Login = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using this pattern for component creation. Please check the button or header to follow the same pattern.

return <div>Login</div>;
};
5 changes: 4 additions & 1 deletion ui/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from "react-router-dom";
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
);

Expand Down