Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] 2023-08-06 #403

Merged
merged 7 commits into from
Aug 7, 2023
Merged
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
12 changes: 1 addition & 11 deletions src/components/Forms/AddRatForm/AddRatForm.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useCallback, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useDispatch } from 'react-redux'

import CMDRFieldset from '~/components/Fieldsets/CMDRFieldset'
import ExpansionFieldset from '~/components/Fieldsets/ExpansionFieldset'
import SelectFieldset from '~/components/Fieldsets/SelectFieldset'
import useForm from '~/hooks/useForm'
import { createRat } from '~/store/actions/rats'
import { selectCurrentUserId } from '~/store/selectors'

import styles from './AddRatForm.module.scss'

Expand All @@ -23,7 +22,6 @@ const initialState = {

function AddRatForm () {
const dispatch = useDispatch()
const userId = useSelector(selectCurrentUserId)
const [formOpen, setFormOpen] = useState(false)
const handleToggleForm = useCallback(() => {
setFormOpen((state) => {
Expand All @@ -39,14 +37,6 @@ function AddRatForm () {
platform,
expansion: platform === 'pc' ? expansion : 'horizons3',
},
relationships: {
user: {
data: {
type: 'users',
id: userId,
},
},
},
}))
setFormOpen(false)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function Header () {
icon={['fab', 'github']}
title="Fuel Rats on GitHub" />
<SocialIcon
href="https://forums.frontier.co.uk/showthread.php/150703-Out-of-Fuel-Explorer-Rescue-Service-The-Fuel-Rats"
href="https://forums.frontier.co.uk/threads/out-of-fuel-explorer-rescue-service-the-fuel-rats.150703/"
icon="space-shuttle"
title="Fuel Rats on Frontier Forums"
transform={{ rotate: -45 }} />
Expand Down
10 changes: 8 additions & 2 deletions src/pages/[slug].js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { HttpStatus } from '@fuelrats/web-util/http'
import { isError } from 'flux-standard-action'

import WordpressPage from '~/components/WordpressPage'
Expand All @@ -19,9 +20,14 @@ WordpressProxy.getInitialProps = async (ctx) => {

if (!selectWordpressPageBySlug(store.getState(), { slug })) {
const response = await store.dispatch(getWordpressPage(slug))
if (isError(response)) {
setError(ctx, response.meta?.response?.status)
if (!isError(response)) {
return
}
if (!response.payload?.length) {
setError(ctx, HttpStatus.NOT_FOUND)
return
}
setError(ctx, response.meta?.response?.status)
}
}

Expand Down
11 changes: 10 additions & 1 deletion src/pages/api/apple-app-site-association.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { HttpStatus } from '@fuelrats/web-util/http'

/*
* Almost always redirected from '/apple-app-site-Association'
* Almost always rewritten from '/.well-known/apple-app-site-Association'
*/
export default function appleAppSiteAssociation (req, res) {
res.status(HttpStatus.OK).json({
appLinks: {
details: [{
appIDs: ['9X89US848J.io.sorlie.Fuel-Rats'],
components: [{
'/': '/verify*',
comment: 'used for handling password reset links in emails',
}],
}],
},
webcredentials: {
apps: ['9X89US848J.io.sorlie.Fuel-Rats'],
},
Expand Down
Loading