mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-03 06:08:06 -06:00
fix interaction-requests urls, router
This commit is contained in:
parent
884e03b4c1
commit
898e2f9f60
5 changed files with 37 additions and 34 deletions
|
|
@ -18,9 +18,13 @@
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
|
||||
import { Redirect, Route, Router, Switch } from "wouter";
|
||||
import { BaseUrlContext, useBaseUrl } from "../../../lib/navigation/util";
|
||||
import InteractionRequestDetail from "./detail";
|
||||
import InteractionRequestsSearchForm from "./search";
|
||||
|
||||
export default function InteractionRequests() {
|
||||
function InteractionRequests() {
|
||||
return (
|
||||
<div className="interaction-requests-view">
|
||||
<div className="form-section-docs">
|
||||
|
|
@ -34,3 +38,25 @@ export default function InteractionRequests() {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* - /settings/users/interaction-requests/search
|
||||
* - /settings/users/interaction-requests/{reqId}
|
||||
*/
|
||||
export default function InteractionRequestsRouter() {
|
||||
const parentUrl = useBaseUrl();
|
||||
const thisBase = "/interaction-requests";
|
||||
const absBase = parentUrl + thisBase;
|
||||
|
||||
return (
|
||||
<BaseUrlContext.Provider value={absBase}>
|
||||
<Router base={thisBase}>
|
||||
<Switch>
|
||||
<Route path="/search" component={InteractionRequests} />
|
||||
<Route path="/:reqId" component={InteractionRequestDetail} />
|
||||
<Redirect to="/search" />
|
||||
</Switch>
|
||||
</Router>
|
||||
</BaseUrlContext.Provider>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue