linter
This commit is contained in:
parent
b3a2e3be94
commit
33e279a443
@ -66,15 +66,15 @@ export default function Component() {
|
|||||||
шаблоны квизов с легкой установкой на любой сайт и социальные сети
|
шаблоны квизов с легкой установкой на любой сайт и социальные сети
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
component={Link}
|
component={Link}
|
||||||
to={"/signin"}
|
to={"/signin"}
|
||||||
state={{ backgroundLocation: location }}
|
state={{ backgroundLocation: location }}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
>
|
>
|
||||||
Попробуйте бесплатно
|
Попробуйте бесплатно
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
component={"img"}
|
component={"img"}
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
import { Tab } from "@mui/material"
|
import { Tab } from "@mui/material";
|
||||||
import { styled } from "@mui/material"
|
import { styled } from "@mui/material";
|
||||||
|
|
||||||
|
|
||||||
export const CustomTab = styled(Tab)(({ theme }) => ({
|
export const CustomTab = styled(Tab)(({ theme }) => ({
|
||||||
...theme.typography.body2,
|
...theme.typography.body2,
|
||||||
color: theme.palette.primary.main,
|
color: theme.palette.primary.main,
|
||||||
padding: "15px",
|
padding: "15px",
|
||||||
minWidth: 0,
|
minWidth: 0,
|
||||||
"&.Mui-selected": {
|
"&.Mui-selected": {
|
||||||
color: "#7e2aea",
|
color: "#7e2aea",
|
||||||
textUnderlinePosition: "under",
|
textUnderlinePosition: "under",
|
||||||
textDecoration: "underline",
|
textDecoration: "underline",
|
||||||
textUnderlineOffset: "3px",
|
textUnderlineOffset: "3px",
|
||||||
},
|
},
|
||||||
"&:first-of-type": {
|
"&:first-of-type": {
|
||||||
paddingLeft: 0,
|
paddingLeft: 0,
|
||||||
}
|
},
|
||||||
}))
|
}));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Tabs as MuiTabs } from "@mui/material"
|
import { Tabs as MuiTabs } from "@mui/material";
|
||||||
import { CustomTab } from "./CustomTab"
|
import { CustomTab } from "./CustomTab";
|
||||||
|
|
||||||
type TabsProps = {
|
type TabsProps = {
|
||||||
names: string[];
|
names: string[];
|
||||||
@ -8,20 +8,25 @@ type TabsProps = {
|
|||||||
setSelectedItem: (num: "count" | "day") => void;
|
setSelectedItem: (num: "count" | "day") => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Tabs = ({ items, names, selectedItem, setSelectedItem }: TabsProps) => (
|
export const Tabs = ({
|
||||||
<MuiTabs
|
items,
|
||||||
sx={{m:"25px"}}
|
names,
|
||||||
TabIndicatorProps={{ sx: { display: "none" } }}
|
selectedItem,
|
||||||
value={selectedItem}
|
setSelectedItem,
|
||||||
onChange={(event, newValue: "count" | "day") => {
|
}: TabsProps) => (
|
||||||
console.log(newValue)
|
<MuiTabs
|
||||||
setSelectedItem(newValue)
|
sx={{ m: "25px" }}
|
||||||
}}
|
TabIndicatorProps={{ sx: { display: "none" } }}
|
||||||
variant="scrollable"
|
value={selectedItem}
|
||||||
scrollButtons={false}
|
onChange={(event, newValue: "count" | "day") => {
|
||||||
>
|
console.log(newValue);
|
||||||
{items.map((item, index) => (
|
setSelectedItem(newValue);
|
||||||
<CustomTab key={item + index} value={item} label={names[index]} />
|
}}
|
||||||
))}
|
variant="scrollable"
|
||||||
</MuiTabs>
|
scrollButtons={false}
|
||||||
)
|
>
|
||||||
|
{items.map((item, index) => (
|
||||||
|
<CustomTab key={item + index} value={item} label={names[index]} />
|
||||||
|
))}
|
||||||
|
</MuiTabs>
|
||||||
|
);
|
||||||
|
@ -67,12 +67,12 @@ function TariffPage() {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: `https://squiz.pena.digital/strator/tariff?page=${page}&limit=100`,
|
url: `https://squiz.pena.digital/strator/tariff?page=${page}&limit=100`,
|
||||||
});
|
});
|
||||||
console.log(page)
|
console.log(page);
|
||||||
|
|
||||||
tariffsList.push(...tariffsResult.tariffs);
|
tariffsList.push(...tariffsResult.tariffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("это то что мы отдаём перед концом",tariffsList)
|
console.log("это то что мы отдаём перед концом", tariffsList);
|
||||||
return tariffsList;
|
return tariffsList;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ function TariffPage() {
|
|||||||
url: "https://squiz.pena.digital/price/discounts",
|
url: "https://squiz.pena.digital/price/discounts",
|
||||||
});
|
});
|
||||||
setUser(user);
|
setUser(user);
|
||||||
console.log("это то что мы получили в самом конце",tariffsList)
|
console.log("это то что мы получили в самом конце", tariffsList);
|
||||||
setTariffs(tariffsList);
|
setTariffs(tariffsList);
|
||||||
setDiscounts(discounts.Discounts);
|
setDiscounts(discounts.Discounts);
|
||||||
let c = currencyFormatter.format(Number(user.wallet.cash) / 100);
|
let c = currencyFormatter.format(Number(user.wallet.cash) / 100);
|
||||||
@ -140,7 +140,7 @@ function TariffPage() {
|
|||||||
|
|
||||||
const purchasesAmount = user?.wallet.purchasesAmount ?? 0;
|
const purchasesAmount = user?.wallet.purchasesAmount ?? 0;
|
||||||
const isUserNko = user?.status === "nko";
|
const isUserNko = user?.status === "nko";
|
||||||
console.log(tariffs)
|
console.log(tariffs);
|
||||||
const filteredTariffs = tariffs.filter((tariff) => {
|
const filteredTariffs = tariffs.filter((tariff) => {
|
||||||
return (
|
return (
|
||||||
tariff.privileges[0].serviceKey === "squiz" &&
|
tariff.privileges[0].serviceKey === "squiz" &&
|
||||||
@ -149,7 +149,7 @@ function TariffPage() {
|
|||||||
tariff.privileges[0]?.type === selectedItem
|
tariff.privileges[0]?.type === selectedItem
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
console.log(filteredTariffs)
|
console.log(filteredTariffs);
|
||||||
|
|
||||||
async function handleLogoutClick() {
|
async function handleLogoutClick() {
|
||||||
const [, logoutError] = await logout();
|
const [, logoutError] = await logout();
|
||||||
@ -209,9 +209,13 @@ function TariffPage() {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Container>
|
</Container>
|
||||||
<Tabs names={Object.values(StepperText)} items={Object.keys(StepperText)} selectedItem={selectedItem} setSelectedItem={setSelectedItem} />
|
<Tabs
|
||||||
|
names={Object.values(StepperText)}
|
||||||
|
items={Object.keys(StepperText)}
|
||||||
|
selectedItem={selectedItem}
|
||||||
|
setSelectedItem={setSelectedItem}
|
||||||
|
/>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
justifyContent: "left",
|
justifyContent: "left",
|
||||||
|
Loading…
Reference in New Issue
Block a user