From 812524672ebc93e192df18b0e57a08632e53b04f Mon Sep 17 00:00:00 2001 From: Skylar Saveland Date: Mon, 27 Feb 2023 16:21:18 -0800 Subject: [PATCH] some extra style for subs on profile (#95) Just want to stop pushing to main with little stuff ;0 --- .../free2z/src/components/MySubscribers.tsx | 107 ++++++++++-------- .../free2z/src/components/MySubscriptions.tsx | 94 ++++++++------- 2 files changed, 111 insertions(+), 90 deletions(-) diff --git a/ts/react/free2z/src/components/MySubscribers.tsx b/ts/react/free2z/src/components/MySubscribers.tsx index feeecb9eb56..3616f05bad3 100644 --- a/ts/react/free2z/src/components/MySubscribers.tsx +++ b/ts/react/free2z/src/components/MySubscribers.tsx @@ -1,14 +1,10 @@ import { useEffect, useState } from "react" -import { Link as RouterLink, useSearchParams } from 'react-router-dom' +import { useSearchParams } from 'react-router-dom' import { - Avatar, Badge, Box, Divider, FormControlLabel, Grid, Link, List, ListItem, ListItemAvatar, ListItemSecondaryAction, ListItemText, ListSubheader, Pagination, Paper, Stack, Switch, Tooltip, Typography + Box, Divider, List, Pagination, Paper, Stack, Switch, Tooltip, Typography } from "@mui/material" import axios from "axios"; import { useGlobalState } from "../state/global"; -import { count } from "console"; -import moment from "moment"; -import TuziIcon from "./TuziIcon"; -import MySubscriptionRow from "./MySubscriptionRow"; import MySubscriberRow from "./MySubscriberRow"; @@ -86,6 +82,7 @@ export default function MySubscribers() { padding: "3%", width: "100%", }}> + {!loading && subscribers.length === 0 && No one has subscribed to you! @@ -96,58 +93,70 @@ export default function MySubscribers() { {((!loading || loaded) && subscribers.length > 0) && - - + - Who subscribes to you - + + Who subscribes to you + - - + + - { - setPageQuery({ - ...pageQuery, - sort: checked ? '-max_price' : 'expires', - }) - setChecked(!checked) - }} - name="sort-toggle" - color="primary" - /> - + { + setPageQuery({ + ...pageQuery, + sort: checked ? '-max_price' : 'expires', + }) + setChecked(!checked) + }} + name="sort-toggle" + color="primary" + /> + + - + + + } + { + count > 20 && + + + } {subscribers.map((sub, index) => { return })} - { - count > 20 && - - - - } ) } \ No newline at end of file diff --git a/ts/react/free2z/src/components/MySubscriptions.tsx b/ts/react/free2z/src/components/MySubscriptions.tsx index 7773eed19b0..7d12d6e245f 100644 --- a/ts/react/free2z/src/components/MySubscriptions.tsx +++ b/ts/react/free2z/src/components/MySubscriptions.tsx @@ -3,6 +3,7 @@ import { useState, useEffect } from "react"; import { Link as RouterLink, useSearchParams } from 'react-router-dom' import { Box, + Divider, FormControlLabel, Link, List, ListItem, ListItemSecondaryAction, ListItemText, Pagination, Paper, Stack, Switch, Tooltip, Typography @@ -85,39 +86,63 @@ export default function MySubscriptions() { {((!loading || loaded) && subscriptions.length > 0) && - - + - Who you subscribe to - + + Who you subscribe to + + + + + { + setPageQuery({ + ...pageQuery, + sort: checked ? '-max_price' : 'expires', + }) + setChecked(!checked) + }} + name="sort-toggle" + color="primary" + /> + + - - - { - setPageQuery({ - ...pageQuery, - sort: checked ? '-max_price' : 'expires', - }) - setChecked(!checked) - }} - name="sort-toggle" - color="primary" - /> - - + + + } + {count > 20 && + + + } + {subscriptions.map((sub, index) => { return })} - {count > 20 && - - - - } ) } \ No newline at end of file