Merge branch 'master' of github.com:Re-Ignited-Development/new-phone-who-dis into feature/ts-cleanup

This commit is contained in:
erik-sn committed 2020-10-11 14:08:29 -04:00
commit 660e171789
11 files changed
+92 -66

No files matched your search

+19 -18
View File
@@ -18,7 +18,7 @@ import { useApps } from "./os/apps/hooks/useApps";
import { useContactsService } from "./apps/contacts/hooks/useContactsService";
import { useTwitterService } from "./apps/twitter/hooks/useTwitterService";
import { useSelloutService } from "./apps/sellout/hooks/useSelloutService";
import { useSelloutService } from "./apps/sellout/hooks/useSelloutService";
//These events are just for testing. Comment it out before building.
setTimeout(() => {
@@ -70,30 +70,31 @@ setTimeout(() => {
setTimeout(() => {
window.dispatchEvent(
new MessageEvent('message', {
new MessageEvent("message", {
data: {
app: 'SELLOUT',
method: 'setListings',
app: "SELLOUT",
method: "setListings",
data: [
{
id: 1,
name: 'Donald Trump',
number: '123-4567',
description: 'This is me just selling the whole country, because like why not dude',
img: 'some shady link?'
id: 1,
name: "Donald Trump",
number: "123-4567",
description:
"This is me just selling the whole country, because like why not dude",
img: "some shady link?",
},
{
id: 2,
name: 'Joe Biden',
number: '666-6666',
description: 'I think I might buy it Trump!',
img: 'even shadier link?'
}
]
}
name: "Joe Biden",
number: "666-6666",
description: "I think I might buy it Trump!",
img: "even shadier link?",
},
],
},
})
)
})
);
});
function Phone() {
useNuiService();
@@ -1,3 +1,3 @@
#sellout-app .Mui-selected {
color: #f44336 !important;
}
}
@@ -1,10 +1,10 @@
import React from 'react'
import { ListingForm } from './ListingForm';
import React from "react";
import { ListingForm } from "./ListingForm";
export const ListingFormContainer = () => {
return (
<div>
<ListingForm />
</div>
)
}
);
};
@@ -1,48 +1,48 @@
import React, { useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import React, { useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import { Link } from "react-router-dom";
import { BottomNavigation, BottomNavigationAction } from "@material-ui/core";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faHome } from '@fortawesome/free-solid-svg-icons'
import AddCircleIcon from '@material-ui/icons/AddCircle';
import FaceIcon from '@material-ui/icons/Face';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faHome } from "@fortawesome/free-solid-svg-icons";
import AddCircleIcon from "@material-ui/icons/AddCircle";
import FaceIcon from "@material-ui/icons/Face";
const useStyles = makeStyles((theme) => ({
root: {
width: '100%'
width: "100%",
},
icon: {
color: "#f44336"
}
}))
color: "#f44336",
},
}));
export const NavigationBar = () => {
const classes = useStyles();
const [activePage, setActivePage] = useState(0);
return (
<BottomNavigation
value={activePage}
value={activePage}
onChange={(event, newPage) => {
setActivePage(newPage)
setActivePage(newPage);
}}
showLabels
className={classes.root}
>
<BottomNavigationAction
<BottomNavigationAction
component={Link}
icon={<FontAwesomeIcon icon={faHome} />}
to="/sellout"
/>
<BottomNavigationAction
<BottomNavigationAction
component={Link}
icon={<AddCircleIcon />}
to="/sellout/new"
/>
<BottomNavigationAction
<BottomNavigationAction
component={Link}
icon={<FaceIcon />}
to="/sellout/new"
/>
</BottomNavigation>
)
}
);
};
+5 -5
View File
@@ -1,8 +1,8 @@
import { atom } from 'recoil';
import { atom } from "recoil";
export const selloutState = {
listing: atom({
key: 'listing',
default: null
})
}
key: "listing",
default: null,
}),
};
+3 -3
View File
@@ -1,7 +1,7 @@
import { useRecoilValue } from 'recoil';
import { selloutState } from './state';
import { useRecoilValue } from "recoil";
import { selloutState } from "./state";
export const useListing = () => {
const listing = useRecoilValue(selloutState.listing);
return { listing };
}
};
@@ -1,10 +1,10 @@
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { selloutState } from './state';
import { useListing } from './useListing';
import { useSetRecoilState } from 'recoil';
import { useNuiEvent } from "../../../os/nui-events/hooks/useNuiEvent";
import { selloutState } from "./state";
import { useListing } from "./useListing";
import { useSetRecoilState } from "recoil";
export const useSelloutService = () => {
const setSellout = useSetRecoilState(selloutState.listing);
useNuiEvent('SELLOUT', 'setListings', setSellout);
return useListing()
}
useNuiEvent("SELLOUT", "setListings", setSellout);
return useListing();
};
+2 -2
View File
@@ -10,8 +10,8 @@ import {
red,
amber,
} from "@material-ui/core/colors";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faAd } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAd } from "@fortawesome/free-solid-svg-icons";
import ContactsIcon from "@material-ui/icons/Contacts";
import SettingsIcon from "@material-ui/icons/Settings";
+7 -2
View File
@@ -1,7 +1,12 @@
import React from "react";
import { AppWrapperTypes } from '../interface/InterfaceUI';
import { AppWrapperTypes } from "../interface/InterfaceUI";
export const AppWrapper = ({ children, style, handleClickAway, ...props }: AppWrapperTypes) => {
export const AppWrapper = ({
children,
style,
handleClickAway,
...props
}: AppWrapperTypes) => {
return (
<div
{...props}