Compare commits

..

4 Commits

Author SHA1 Message Date
victorAnumudu 96972dbe2f notification bug fixed 2023-07-16 06:51:38 +01:00
CHIEFSOFT\ameye 7146048aee style 2023-07-15 22:16:29 -04:00
CHIEFSOFT\ameye 39f1f5bc73 Resource Question page starter 2023-07-15 21:39:53 -04:00
ameye 752fc6a4a8 Merge branch 'history-page-tab' of WrenchBoard/Users-Wrench into master 2023-07-15 21:39:05 +00:00
6 changed files with 36 additions and 5 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

+2 -1
View File
@@ -9,6 +9,7 @@ import products from "../../data/product_data.json";
import Layout from "../Partials/Layout";
import {
ActivitiesTab, BlogTab,
QuestionsTab,
CollectionTab,
CreatedTab,
HiddenProductsTab,
@@ -39,7 +40,7 @@ export default function Resources(props) {
// Category Components
const tabComponents = {
blog: <BlogTab blogdata={blogItems} />,
onsale: <OnSaleTab products={onSaleProducts} />,
onsale: <QuestionsTab products={onSaleProducts} />,
owned: <OwnTab products={ownProducts} />,
created: (
<CreatedTab marketProducts={CreatedSell} mainProducts={CreatedBits} />
@@ -0,0 +1,28 @@
import ProductCardStyleTwo from "../../Cards/ProductCardStyleTwo";
import DataIteration from "../../Helpers/DataIteration";
import SearchCom from "../../Helpers/SearchCom";
export default function QuestionsTab({ className, products }) {
return (
<>
<div className={`onsale-tab-wrapper w-full ${className || ""}`}>
<div className="main-container w-full">
<div className="filter-section w-full items-center sm:flex justify-between mb-6">
{/* filter-search */}
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
<SearchCom />
</div>
</div>
<div className="content-section w-full-width">
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
</div>
</div>
</div>
</div>
</>
);
}
+2
View File
@@ -5,9 +5,11 @@ import HiddenProductsTab from "./HiddenProductsTab";
import OnSaleTab from "./OnSaleTab";
import OwnTab from "./OwnTab";
import BlogTab from "./BlogTab";
import QuestionsTab from "./QuestionsTab";
export {
BlogTab,
QuestionsTab,
ActivitiesTab,
CollectionTab,
CreatedTab,
@@ -26,7 +26,7 @@ export default function NotificationSettingTab() {
setAccSettings(prev => {
let newAccSettings = prev.data.map(data => {
if(data.uid == item.uid){
let newPrefValue = data.pref_value == null || data.pref_value == false ? true : false
let newPrefValue = data.pref_value == null || data.pref_value == '0' ? '100' : '0'
return {...data, pref_value: newPrefValue}
}else{
return data
@@ -40,7 +40,7 @@ export default function NotificationSettingTab() {
setNotificationChange({loading: true, uid: item.uid})
let reqData = { // API PAYLOADS
pref_id: item.pref_id,
status: '100'
status: item.pref_value == null || item.pref_value == 0 ? 100 : 0
}
api.setAccSettings(reqData).then(res => {
if(res.status != 200 || res.data.internal_return < 0){
@@ -94,7 +94,7 @@ export default function NotificationSettingTab() {
<LoadingSpinner size='8' color='sky-blue' />
:
<SwitchCom
value={item.pref_value}
value={item.pref_value == null || item.pref_value == '0' ? 0 : 100}
handler={ notificationChange.loading ? ()=>{} : () => handleNotificationChange(item)}
// value={updateNotification}
// handler={() => setUpdateNotification(!updateNotification)}
+1 -1
View File
@@ -17,7 +17,7 @@
}
.RECIPIENT{
margin-right: 60px !important;
background-color: lightblue;
background-color: #add8e6 !important;
}
.wallet-box{
background-color: aliceblue;