Get rid of modal

This commit is contained in:
SleeplessOne1917 2023-07-21 15:20:27 -04:00
parent d02afa3b6a
commit dcc17375b4
3 changed files with 1 additions and 61 deletions

View file

@ -6,7 +6,6 @@ import { UserService } from "../shared/services";
import "bootstrap/js/dist/collapse"; import "bootstrap/js/dist/collapse";
import "bootstrap/js/dist/dropdown"; import "bootstrap/js/dist/dropdown";
import "bootstrap/js/dist/modal";
async function startClient() { async function startClient() {
initializeSite(window.isoData.site_res); initializeSite(window.isoData.site_res);

View file

@ -161,7 +161,6 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
</div> </div>
</section> </section>
</div> </div>
{this.remoteFetchModal}
</aside> </aside>
); );
} }
@ -257,12 +256,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
if (!UserService.Instance.myUserInfo) { if (!UserService.Instance.myUserInfo) {
return ( return (
<button <button type="button" className="btn btn-secondary d-block mb-2 w-100">
type="button"
className="btn btn-secondary d-block mb-2 w-100"
data-bs-toggle="modal"
data-bs-target="#remoteFetchModal"
>
{I18NextService.i18n.t("subscribe")} {I18NextService.i18n.t("subscribe")}
</button> </button>
); );
@ -295,56 +289,6 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
); );
} }
get remoteFetchModal() {
return (
<div
className="modal fade"
id="remoteFetchModal"
tabIndex={-1}
aria-hidden={true}
aria-labelledby="#remoteFetchModalTitle"
>
<div className="modal-dialog modal-fullscreen-sm-down">
<div className="modal-content">
<header className="modal-header">
<h3 className="modal-title" id="remoteFetchModalTitle">
Subscribe from Remote Instance
</h3>
<button
type="button"
className="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
/>
</header>
<form className="modal-body d-flex flex-column justify-content-center">
<label className="form-label" htmlFor="remoteFetchInstance">
Enter the instance you would like to follow this community from
</label>
<input
type="text"
id="remoteFetchInstance"
className="form-control"
/>
</form>
<footer className="modal-footer">
<button
type="button"
className="btn btn-secondary"
data-bs-dismiss="modal"
>
Close
</button>
<button type="button" className="btn btn-primary">
Save changes
</button>
</footer>
</div>
</div>
</div>
);
}
blockCommunity() { blockCommunity() {
const { subscribed, blocked } = this.props.community_view; const { subscribed, blocked } = this.props.community_view;

View file

@ -60,9 +60,6 @@ async function handleLoginSubmit(i: Login, event: any) {
const { hash, pathname, search } = (i.props.history.location.state ?? const { hash, pathname, search } = (i.props.history.location.state ??
{}) as Location; {}) as Location;
console.log("Login state");
console.log(i.props.history.location.state);
i.props.history.location.state i.props.history.location.state
? i.props.history.replace({ hash, pathname, search }) ? i.props.history.replace({ hash, pathname, search })
: i.props.history.action === "PUSH" : i.props.history.action === "PUSH"