Skip to content

Commit b4afdd1

Browse files
committed
Merge branch 'develop'
2 parents 09bcae1 + facb1f4 commit b4afdd1

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [1.5.0] - 2023-10-26
8+
9+
- [#221](https://github.com/os2display/display-admin-client/pull/221)
10+
- Fixed missing pagination button in drag-and-drop-table.
11+
- [#214](https://github.com/os2display/display-admin-client/pull/214)
12+
- Use OIDC Code authorization flow and remove React StrictMode.
13+
714
## [1.4.0] - 2023-09-14
815

916
- [#210](https://github.com/os2display/display-admin-client/pull/210)

src/components/user/login.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@ function Login() {
130130

131131
useEffect(() => {
132132
let isMounted = true;
133-
let idToken = null;
133+
let code = null;
134134
let state = null;
135135

136136
if (search) {
137137
const query = queryString.parse(search);
138-
idToken = query.id_token;
138+
code = query.code;
139139
state = query.state;
140140
}
141141

142142
ConfigLoader.loadConfig().then((config) => {
143-
if (state && idToken) {
143+
if (state && code) {
144144
fetch(
145-
`${config.api}v1/authentication/oidc/token?state=${state}&id_token=${idToken}`,
145+
`${config.api}v1/authentication/oidc/token?state=${state}&code=${code}`,
146146
{
147147
mode: "cors",
148148
credentials: "include",

src/components/util/drag-and-drop-table/drag-and-drop-table.jsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ import ColumnProptypes from "../../proptypes/column-proptypes";
1010
import PaginationButton from "../forms/multiselect-dropdown/pagination-button";
1111
import "./drag-and-drop-table.scss";
1212

13-
// Drag and drop component (react-beautiful-dnd) is replaced with hello-pangea/dnd,
14-
// because the drag and drop component does not work with react 18
15-
// https://github.com/atlassian/react-beautiful-dnd/issues/2350
16-
// If it some day works with react, we should consider changing it back
1713
/**
1814
* @param {object} props The props.
1915
* @param {Array} props.columns The columns for the table.
@@ -126,7 +122,7 @@ function DragAndDropTable({
126122
{data.map((item, index) => (
127123
<Draggable
128124
key={item["@id"]}
129-
draggableId={item.title}
125+
draggableId={item["@id"]}
130126
index={index}
131127
>
132128
{(providedDraggable, providedSnapshot) => (
@@ -164,7 +160,7 @@ function DragAndDropTable({
164160
<Row>
165161
<Col>
166162
{totalItems > data.length && (
167-
<PaginationButton label={label} callback={callback} />
163+
<PaginationButton label={label} callback={callback} showButton />
168164
)}
169165
</Col>
170166
</Row>
@@ -184,4 +180,5 @@ DragAndDropTable.propTypes = {
184180
callback: PropTypes.func.isRequired,
185181
totalItems: PropTypes.number.isRequired,
186182
};
183+
187184
export default DragAndDropTable;

src/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ const root = createRoot(container);
1010

1111
root.render(
1212
<Provider store={store}>
13-
<React.StrictMode>
14-
<BrowserRouter basename="/admin">
15-
<App />
16-
</BrowserRouter>
17-
</React.StrictMode>
13+
<BrowserRouter basename="/admin">
14+
<App />
15+
</BrowserRouter>
1816
</Provider>
1917
);

0 commit comments

Comments
 (0)