This commit is contained in:
ntr committed 2023-01-26 15:24:05 +11:00
1 parent b91f877045
commit f76ceb011e
11 files changed
+56 -52

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ const Nav = () => {
return (
<header>
{user ? nav() : anonNav()}
{showAdmin(user) ? adminNav() : <div></div>}
{showAdmin(user) ? adminNav() : <div />}
{user ? userNav() : null}
</header>
);
+1 -1
View File
@@ -65,7 +65,7 @@ export default function OfferGroup(group, i) {
return (
<div class="offer" key={i}>
<section>
<h3>{group.details.artists_sort} - {group.details.title} <a href={group.details.uri} target="_blank"><ExternalLink /></a></h3>
<h3>{group.details.artists_sort} - {group.details.title} <a href={group.details.uri} target="_blank" rel="noreferrer"><ExternalLink /></a></h3>
<div class='alt-text details'>
{group.details.year} - {detailText}
</div>
+1 -1
View File
@@ -29,7 +29,7 @@ export default function Offer(offer) {
return (
<div class="offer">
<section>
<h3>{details.artists_sort} - {details.title} <a href={details.uri} target="_blank"><ExternalLink /></a></h3>
<h3>{details.artists_sort} - {details.title} <a href={details.uri} target="_blank" rel="noreferrer"><ExternalLink /></a></h3>
<div class='alt-text' >{details.year}</div>
<div class='alt-text'>{details.formats[0].descriptions.join(' ')}</div>
<div class='number'>mcrates price: ${offer.total}</div>
+1 -1
View File
@@ -27,7 +27,7 @@ function Want(want) {
return (
<article key={r.id}>
<div>
<h3>{r.artists_sort} - {r.title} <a href={r.uri} target="_blank"><ExternalLink /></a></h3>
<h3>{r.artists_sort} - {r.title} <a href={r.uri} target="_blank" rel="noreferrer"><ExternalLink /></a></h3>
</div>
<img src={r.thumb} />
<div class='details'>
+2 -2
View File
@@ -15,8 +15,8 @@ declare module 'axios' {
}
const api = axios.create({
baseURL: '/api',
withCredentials: true
baseURL: '/api',
withCredentials: true
});
function onSuccess(response) {
+2 -2
View File
@@ -34,7 +34,7 @@ function Item({ item }) {
return (
<div key={item.id} class={bold}>
<a href={item.listing.data.uri} target="_blank" >
<a href={item.listing.data.uri} target="_blank" rel="noreferrer" >
<h4>{item.listing.data.release.description}</h4>
</a>
<h5>{item.user.email}</h5>
@@ -53,7 +53,7 @@ function SellerGroup(group) {
return (
<div class="bundle">
<section>
<section>
<h2>{group.username} - {group.seller}</h2>
<h3>{ready} / {group.offers.length} offers</h3>
<h4>Ships: {group.mentionsAustralia && 'AU'} {group.mentionsWorldwide && 'WORLD'}</h4>
+1 -1
View File
@@ -93,7 +93,7 @@ const Login = ({ mode }) => {
<input type="password" name="password" id="password" />
</div>
<div class="item">
<input type="submit" value="login"/>
<input type="submit" value="login" />
</div>
</form>
<button onClick={gotoRegister}> create account </button>
+2 -2
View File
@@ -27,7 +27,7 @@ function Result(r, wants) {
<article key={r.id}>
<button onClick={onClick} disabled={added} class={classes} >{btnText}</button>
<div>
<h3>{r.title} <a href={`https://discogs.com${r.uri}`} target="_blank"><ExternalLink /></a></h3>
<h3>{r.title} <a href={`https://discogs.com${r.uri}`} target="_blank" rel="noreferrer"><ExternalLink /></a></h3>
<h5 class='alt-text' >{r.year}</h5>
<h5 class='alt-text'>{r.country}</h5>
<h5 class='alt-text'>{r.format.join(' ')}</h5>
@@ -89,7 +89,7 @@ const User = () => {
: null;
const infoEl = infoText
? <article><div></div><div>{infoText}</div></article>
? <article><div /><div>{infoText}</div></article>
: null;
return (
+33 -33
View File
@@ -2,58 +2,58 @@ import { createStore, combineReducers } from 'redux'
import { configureStore, createSlice } from '@reduxjs/toolkit'
export const userState = createSlice({
name: 'user',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
name: 'user',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
});
export const offersState = createSlice({
name: 'offers',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
name: 'offers',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
});
export const acpOffersState = createSlice({
name: 'acpOffers',
initialState: [],
reducers: {
set: (state, action) => action.payload
},
name: 'acpOffers',
initialState: [],
reducers: {
set: (state, action) => action.payload
},
});
export const wantsState = createSlice({
name: 'wants',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
name: 'wants',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
});
export const wsState = createSlice({
name: 'ws',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
name: 'ws',
initialState: null,
reducers: {
set: (state, action) => action.payload
},
});
const reducer = combineReducers({
offers: offersState.reducer,
wants: wantsState.reducer,
ws: wsState.reducer,
user: userState.reducer,
offers: offersState.reducer,
wants: wantsState.reducer,
ws: wsState.reducer,
user: userState.reducer,
acpOffers: acpOffersState.reducer,
acpOffers: acpOffersState.reducer,
});
const store = createStore(
reducer,
// @ts-ignore -- devtools window exists on dev
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
reducer,
// @ts-ignore -- devtools window exists on dev
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
export default store;