mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
formatting
This commit is contained in:
1 parent
e48263838f
commit
3a1bd75f97
23 files changed
+304
-231
No files matched your search
@@ -69,6 +69,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
"watch": "cra-build-watch --disable-chunks --build-path ../resources/html --output-filename dev.js",
|
"watch": "cra-build-watch --disable-chunks --build-path ../resources/html --output-filename dev.js",
|
||||||
|
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,scss,md}",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
|
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
|
||||||
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.[jt]s?(x)",
|
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.[jt]s?(x)",
|
||||||
|
|||||||
+3
-3
@@ -44,19 +44,19 @@ setTimeout(() => {
|
|||||||
id: 1,
|
id: 1,
|
||||||
number: "345-4366",
|
number: "345-4366",
|
||||||
display: "Gjelten",
|
display: "Gjelten",
|
||||||
avatar: 'https://i.imgur.com/Qpw6j8D.png'
|
avatar: "https://i.imgur.com/Qpw6j8D.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
number: "456-4366",
|
number: "456-4366",
|
||||||
display: "Loyd",
|
display: "Loyd",
|
||||||
avatar: ''
|
avatar: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
number: "123-4366",
|
number: "123-4366",
|
||||||
display: "Fabian",
|
display: "Fabian",
|
||||||
avatar: 'https://i.imgur.com/B8ta5Aa.jpeg'
|
avatar: "https://i.imgur.com/B8ta5Aa.jpeg",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,13 +4,12 @@ import { Button, TextField } from "@material-ui/core";
|
|||||||
import Nui from "../../../os/nui-events/utils/Nui";
|
import Nui from "../../../os/nui-events/utils/Nui";
|
||||||
import List from "@material-ui/core/List";
|
import List from "@material-ui/core/List";
|
||||||
import ListItem from "@material-ui/core/ListItem";
|
import ListItem from "@material-ui/core/ListItem";
|
||||||
import Modal from '../../../ui/components/Modal';
|
import Modal from "../../../ui/components/Modal";
|
||||||
import { useModal } from '../hooks/useModal';
|
import { useModal } from "../hooks/useModal";
|
||||||
import ClearIcon from '@material-ui/icons/Clear';
|
import ClearIcon from "@material-ui/icons/Clear";
|
||||||
import PersonIcon from '@material-ui/icons/Person';
|
import PersonIcon from "@material-ui/icons/Person";
|
||||||
import PhoneIcon from '@material-ui/icons/Phone';
|
import PhoneIcon from "@material-ui/icons/Phone";
|
||||||
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
|
import AccountCircleIcon from "@material-ui/icons/AccountCircle";
|
||||||
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) => ({
|
const useStyles = makeStyles((theme: Theme) => ({
|
||||||
button: {
|
button: {
|
||||||
@@ -26,32 +25,32 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|||||||
height: "20%",
|
height: "20%",
|
||||||
},
|
},
|
||||||
clearButton: {
|
clearButton: {
|
||||||
width: '10%',
|
width: "10%",
|
||||||
position: 'absolute',
|
position: "absolute",
|
||||||
right: 0
|
right: 0,
|
||||||
},
|
},
|
||||||
textInputField: {
|
textInputField: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
borderBottomColor: 'red'
|
borderBottomColor: "red",
|
||||||
},
|
},
|
||||||
addBtn: {
|
addBtn: {
|
||||||
margin: 'auto',
|
margin: "auto",
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
width: 150,
|
width: 150,
|
||||||
background: "#2196f3",
|
background: "#2196f3",
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
padding: 8
|
padding: 8,
|
||||||
},
|
},
|
||||||
cancelBtn: {
|
cancelBtn: {
|
||||||
margin: 'auto',
|
margin: "auto",
|
||||||
width: 150,
|
width: 150,
|
||||||
background: "#232323",
|
background: "#232323",
|
||||||
marginBottom: 20,
|
marginBottom: 20,
|
||||||
padding: 8
|
padding: 8,
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
marginRight: 5
|
marginRight: 5,
|
||||||
}
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const AddContactModal = () => {
|
export const AddContactModal = () => {
|
||||||
@@ -69,25 +68,27 @@ export const AddContactModal = () => {
|
|||||||
Nui.send("contacts:add", {
|
Nui.send("contacts:add", {
|
||||||
name,
|
name,
|
||||||
number,
|
number,
|
||||||
avatar
|
avatar,
|
||||||
});
|
});
|
||||||
console.log(name, number, avatar);
|
console.log(name, number, avatar);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const _handleClose = () => {
|
const _handleClose = () => {
|
||||||
setShowModal(false)
|
setShowModal(false);
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal visible={showModal} handleClose={_handleClose}>
|
<Modal visible={showModal} handleClose={_handleClose}>
|
||||||
<Button onClick={_handleClose} className={classes.clearButton}><ClearIcon /></Button>
|
<Button onClick={_handleClose} className={classes.clearButton}>
|
||||||
|
<ClearIcon />
|
||||||
|
</Button>
|
||||||
<List style={{ marginTop: 30 }}>
|
<List style={{ marginTop: 30 }}>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<PersonIcon className={classes.icons} />
|
<PersonIcon className={classes.icons} />
|
||||||
<TextField
|
<TextField
|
||||||
value={name}
|
value={name}
|
||||||
inputProps={{ className: classes.textInputField}}
|
inputProps={{ className: classes.textInputField }}
|
||||||
onChange={(e) => setName(e.target.value)}
|
onChange={(e) => setName(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
variant="standard"
|
variant="standard"
|
||||||
@@ -98,7 +99,7 @@ export const AddContactModal = () => {
|
|||||||
<PhoneIcon className={classes.icons} />
|
<PhoneIcon className={classes.icons} />
|
||||||
<TextField
|
<TextField
|
||||||
value={number}
|
value={number}
|
||||||
inputProps={{ className: classes.textInputField}}
|
inputProps={{ className: classes.textInputField }}
|
||||||
onChange={(e) => setNumber(e.target.value)}
|
onChange={(e) => setNumber(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
placeholder="Number"
|
placeholder="Number"
|
||||||
@@ -110,7 +111,7 @@ export const AddContactModal = () => {
|
|||||||
<AccountCircleIcon className={classes.icons} />
|
<AccountCircleIcon className={classes.icons} />
|
||||||
<TextField
|
<TextField
|
||||||
value={avatar}
|
value={avatar}
|
||||||
inputProps={{ className: classes.textInputField}}
|
inputProps={{ className: classes.textInputField }}
|
||||||
onChange={(e) => setAvatar(e.target.value)}
|
onChange={(e) => setAvatar(e.target.value)}
|
||||||
fullWidth
|
fullWidth
|
||||||
placeholder="Avatar URL"
|
placeholder="Avatar URL"
|
||||||
@@ -118,8 +119,10 @@ export const AddContactModal = () => {
|
|||||||
type="text"
|
type="text"
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
<Button className={classes.addBtn} onClick={addContact}>Add Contact</Button>
|
<Button className={classes.addBtn} onClick={addContact}>
|
||||||
|
Add Contact
|
||||||
|
</Button>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react'
|
import React from "react";
|
||||||
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
|
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
|
||||||
import Paper from "@material-ui/core/Paper";
|
import Paper from "@material-ui/core/Paper";
|
||||||
import ContactsIcon from "@material-ui/icons/Contacts";
|
import ContactsIcon from "@material-ui/icons/Contacts";
|
||||||
@@ -21,12 +21,11 @@ const useStyles = makeStyles((theme: Theme) =>
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
export const ContactTitle = () => {
|
export const ContactTitle = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
return (
|
return (
|
||||||
<Paper className={classes.root} square variant="outlined" elevation={24}>
|
<Paper className={classes.root} square variant="outlined" elevation={24}>
|
||||||
<ContactsIcon className={classes.icon} />
|
<ContactsIcon className={classes.icon} />
|
||||||
</Paper>
|
</Paper>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
@@ -6,12 +6,11 @@ import { AppContent } from "../../../ui/components/AppContent";
|
|||||||
import { ContactList } from "./List/ContactList";
|
import { ContactList } from "./List/ContactList";
|
||||||
import { useApp } from "../../../os/apps/hooks/useApps";
|
import { useApp } from "../../../os/apps/hooks/useApps";
|
||||||
import { AddContactModal } from "./ContactModal";
|
import { AddContactModal } from "./ContactModal";
|
||||||
import { useModal } from '../hooks/useModal';
|
import { useModal } from "../hooks/useModal";
|
||||||
import { SearchContacts } from "./List/SearchContacts";
|
import { SearchContacts } from "./List/SearchContacts";
|
||||||
import PersonAddIcon from '@material-ui/icons/PersonAdd'
|
import PersonAddIcon from "@material-ui/icons/PersonAdd";
|
||||||
|
|
||||||
import Fab from '@material-ui/core/Fab';
|
|
||||||
|
|
||||||
|
import Fab from "@material-ui/core/Fab";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) =>
|
const useStyles = makeStyles((theme: Theme) =>
|
||||||
createStyles({
|
createStyles({
|
||||||
@@ -26,7 +25,7 @@ const useStyles = makeStyles((theme: Theme) =>
|
|||||||
zIndex: 5,
|
zIndex: 5,
|
||||||
},
|
},
|
||||||
absolute: {
|
absolute: {
|
||||||
position: 'sticky',
|
position: "sticky",
|
||||||
bottom: theme.spacing(2),
|
bottom: theme.spacing(2),
|
||||||
left: theme.spacing(3),
|
left: theme.spacing(3),
|
||||||
},
|
},
|
||||||
@@ -34,7 +33,6 @@ const useStyles = makeStyles((theme: Theme) =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
export const ContactsApp = () => {
|
export const ContactsApp = () => {
|
||||||
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const { showModal, setShowModal } = useModal();
|
const { showModal, setShowModal } = useModal();
|
||||||
const contacts = useApp("CONTACTS");
|
const contacts = useApp("CONTACTS");
|
||||||
@@ -43,16 +41,19 @@ export const ContactsApp = () => {
|
|||||||
setShowModal(true);
|
setShowModal(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppWrapper id="contact-app">
|
<AppWrapper id="contact-app">
|
||||||
<AppTitle app={contacts}></AppTitle>
|
<AppTitle app={contacts}></AppTitle>
|
||||||
<SearchContacts />
|
<SearchContacts />
|
||||||
<AddContactModal/>
|
<AddContactModal />
|
||||||
<div className={showModal ? classes.backgroundModal : undefined} />
|
<div className={showModal ? classes.backgroundModal : undefined} />
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<ContactList />
|
<ContactList />
|
||||||
<Fab onClick={openModal} style={{backgroundColor: '#2196f3', color: '#fff'}} className={classes.absolute}>
|
<Fab
|
||||||
|
onClick={openModal}
|
||||||
|
style={{ backgroundColor: "#2196f3", color: "#fff" }}
|
||||||
|
className={classes.absolute}
|
||||||
|
>
|
||||||
<PersonAddIcon />
|
<PersonAddIcon />
|
||||||
</Fab>
|
</Fab>
|
||||||
</AppContent>
|
</AppContent>
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ListItemText from "@material-ui/core/ListItemText";
|
import ListItemText from "@material-ui/core/ListItemText";
|
||||||
import {
|
import { Button, ListItemAvatar, Avatar as MuiAvatar } from "@material-ui/core";
|
||||||
Button,
|
|
||||||
ListItemAvatar,
|
|
||||||
Avatar as MuiAvatar
|
|
||||||
} from "@material-ui/core";
|
|
||||||
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faPen } from "@fortawesome/free-solid-svg-icons";
|
import { faPen } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
|
||||||
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
|
import { useFilteredContacts } from "../../hooks/useFilteredContacts";
|
||||||
|
|
||||||
import PhoneIcon from "@material-ui/icons/Phone";
|
import PhoneIcon from "@material-ui/icons/Phone";
|
||||||
import ChatIcon from "@material-ui/icons/Chat";
|
import ChatIcon from "@material-ui/icons/Chat";
|
||||||
@@ -20,7 +16,6 @@ import { useContacts } from "../../hooks/useContacts";
|
|||||||
import Nui from "../../../../os/nui-events/utils/Nui";
|
import Nui from "../../../../os/nui-events/utils/Nui";
|
||||||
|
|
||||||
export const ContactList = () => {
|
export const ContactList = () => {
|
||||||
|
|
||||||
const { filteredContacts } = useFilteredContacts();
|
const { filteredContacts } = useFilteredContacts();
|
||||||
|
|
||||||
const contacts = useContacts();
|
const contacts = useContacts();
|
||||||
@@ -34,31 +29,40 @@ export const ContactList = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<List>
|
<List>
|
||||||
{contacts.contacts.filter(contact => contact.display.includes(filteredContacts) || contact.number.includes(filteredContacts)).map((contact) => (
|
{contacts.contacts
|
||||||
<ListItem key={contact.id} divider>
|
.filter(
|
||||||
<ListItemAvatar>
|
(contact) =>
|
||||||
{contact.avatar ? (
|
contact.display.includes(filteredContacts) ||
|
||||||
<MuiAvatar src={contact.avatar} />
|
contact.number.includes(filteredContacts)
|
||||||
): (
|
)
|
||||||
<MuiAvatar>{contact.display.slice(0, 1)}</MuiAvatar>
|
.map((contact) => (
|
||||||
)}
|
<ListItem key={contact.id} divider>
|
||||||
</ListItemAvatar>
|
<ListItemAvatar>
|
||||||
<ListItemText primary={contact.display} secondary={contact.number} />
|
{contact.avatar ? (
|
||||||
<Button onClick={() => startCall(contact.number)}>
|
<MuiAvatar src={contact.avatar} />
|
||||||
<PhoneIcon />
|
) : (
|
||||||
</Button>
|
<MuiAvatar>{contact.display.slice(0, 1)}</MuiAvatar>
|
||||||
<Button
|
)}
|
||||||
onClick={() =>
|
</ListItemAvatar>
|
||||||
console.log("Message: " + contact.display, contact.number)
|
<ListItemText
|
||||||
}
|
primary={contact.display}
|
||||||
>
|
secondary={contact.number}
|
||||||
<ChatIcon />
|
/>
|
||||||
</Button>
|
<Button onClick={() => startCall(contact.number)}>
|
||||||
<Button>
|
<PhoneIcon />
|
||||||
<FontAwesomeIcon icon={faPen} size="lg"/>
|
</Button>
|
||||||
</Button>
|
<Button
|
||||||
</ListItem>
|
onClick={() =>
|
||||||
))}
|
console.log("Message: " + contact.display, contact.number)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<ChatIcon />
|
||||||
|
</Button>
|
||||||
|
<Button>
|
||||||
|
<FontAwesomeIcon icon={faPen} size="lg" />
|
||||||
|
</Button>
|
||||||
|
</ListItem>
|
||||||
|
))}
|
||||||
</List>
|
</List>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,95 +1,97 @@
|
|||||||
import React, { useState } from 'react'
|
import React, { useState } from "react";
|
||||||
import { InputBase } from "@material-ui/core";
|
import { InputBase } from "@material-ui/core";
|
||||||
import SearchIcon from '@material-ui/icons/Search';
|
import SearchIcon from "@material-ui/icons/Search";
|
||||||
import { createStyles, fade, Theme, makeStyles } from '@material-ui/core/styles';
|
import {
|
||||||
|
createStyles,
|
||||||
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
|
fade,
|
||||||
|
Theme,
|
||||||
|
makeStyles,
|
||||||
|
} from "@material-ui/core/styles";
|
||||||
|
|
||||||
|
import { useFilteredContacts } from "../../hooks/useFilteredContacts";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) =>
|
const useStyles = makeStyles((theme: Theme) =>
|
||||||
createStyles({
|
createStyles({
|
||||||
bg: {
|
bg: {
|
||||||
backgroundColor: "#232323",
|
backgroundColor: "#232323",
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
height: 60,
|
height: 60,
|
||||||
justifyContent: 'center',
|
justifyContent: "center",
|
||||||
alignItems: 'center'
|
alignItems: "center",
|
||||||
},
|
},
|
||||||
textFieldInput: {
|
textFieldInput: {
|
||||||
fontSize: 20
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
inputRoot: {
|
inputRoot: {
|
||||||
color: '#fff',
|
color: "#fff",
|
||||||
fontSize: 18
|
fontSize: 18,
|
||||||
},
|
},
|
||||||
inputInput: {
|
inputInput: {
|
||||||
padding: theme.spacing(1, 4, 1, 4),
|
padding: theme.spacing(1, 4, 1, 4),
|
||||||
// vertical padding + font size from searchIcon
|
// vertical padding + font size from searchIcon
|
||||||
transition: theme.transitions.create('width'),
|
transition: theme.transitions.create("width"),
|
||||||
width: '100%',
|
width: "100%",
|
||||||
|
|
||||||
[theme.breakpoints.up('sm')]: {
|
[theme.breakpoints.up("sm")]: {
|
||||||
width: '13ch',
|
width: "13ch",
|
||||||
'&:focus': {
|
"&:focus": {
|
||||||
width: '20ch',
|
width: "20ch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
position: 'relative',
|
position: "relative",
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
backgroundColor: fade(theme.palette.common.white, 0.15),
|
backgroundColor: fade(theme.palette.common.white, 0.15),
|
||||||
'&:hover': {
|
"&:hover": {
|
||||||
backgroundColor: fade(theme.palette.common.white, 0.25),
|
backgroundColor: fade(theme.palette.common.white, 0.25),
|
||||||
},
|
},
|
||||||
marginLeft: 0,
|
marginLeft: 0,
|
||||||
width: '100%',
|
width: "100%",
|
||||||
[theme.breakpoints.up('sm')]: {
|
[theme.breakpoints.up("sm")]: {
|
||||||
marginLeft: theme.spacing(1),
|
marginLeft: theme.spacing(1),
|
||||||
width: 'auto',
|
width: "auto",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
searchIcon: {
|
searchIcon: {
|
||||||
padding: theme.spacing(0, 0.5),
|
padding: theme.spacing(0, 0.5),
|
||||||
height: '100%',
|
height: "100%",
|
||||||
position: 'absolute',
|
position: "absolute",
|
||||||
pointerEvents: 'none',
|
pointerEvents: "none",
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
alignItems: 'center',
|
alignItems: "center",
|
||||||
justifyContent: 'center',
|
justifyContent: "center",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
export const SearchContacts = () => {
|
export const SearchContacts = () => {
|
||||||
|
|
||||||
const { setFilteredContacts } = useFilteredContacts();
|
const { setFilteredContacts } = useFilteredContacts();
|
||||||
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const [ searchValue, setSearchValue ] = useState('')
|
const [searchValue, setSearchValue] = useState("");
|
||||||
|
|
||||||
|
|
||||||
const handleChange = (e) => {
|
const handleChange = (e) => {
|
||||||
setSearchValue(e.target.value)
|
setSearchValue(e.target.value);
|
||||||
setFilteredContacts(e.target.value)
|
setFilteredContacts(e.target.value);
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.bg}>
|
<div className={classes.bg}>
|
||||||
<div className={classes.search}>
|
<div className={classes.search}>
|
||||||
<div className={classes.searchIcon}>
|
<div className={classes.searchIcon}>
|
||||||
<SearchIcon style={{ color: '#fff' }} />
|
<SearchIcon style={{ color: "#fff" }} />
|
||||||
</div>
|
</div>
|
||||||
<InputBase
|
<InputBase
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
placeholder="Search contacts..."
|
placeholder="Search contacts..."
|
||||||
classes={{
|
classes={{
|
||||||
root: classes.inputRoot,
|
root: classes.inputRoot,
|
||||||
input: classes.inputInput
|
input: classes.inputInput,
|
||||||
}}
|
}}
|
||||||
inputProps={{ 'aria-label': 'search' }}
|
inputProps={{ "aria-label": "search" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
@@ -6,11 +6,11 @@ export const contactsState = {
|
|||||||
default: [],
|
default: [],
|
||||||
}),
|
}),
|
||||||
showModal: atom({
|
showModal: atom({
|
||||||
key: 'showModal',
|
key: "showModal",
|
||||||
default: false
|
default: false,
|
||||||
}),
|
}),
|
||||||
filterContacts: atom({
|
filterContacts: atom({
|
||||||
key: 'filterContacts',
|
key: "filterContacts",
|
||||||
default: ""
|
default: "",
|
||||||
})
|
}),
|
||||||
};
|
};
|
||||||
@@ -5,7 +5,7 @@ interface Contact {
|
|||||||
id: string;
|
id: string;
|
||||||
display: string;
|
display: string;
|
||||||
number: string;
|
number: string;
|
||||||
img?: string
|
img?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IUseContacts {
|
interface IUseContacts {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { useRecoilState } from 'recoil';
|
import { useRecoilState } from "recoil";
|
||||||
import { contactsState } from './state';
|
import { contactsState } from "./state";
|
||||||
|
|
||||||
export const useFilteredContacts = () => {
|
export const useFilteredContacts = () => {
|
||||||
const [ filteredContacts, setFilteredContacts ] = useRecoilState(contactsState.filterContacts);
|
const [filteredContacts, setFilteredContacts] = useRecoilState(
|
||||||
|
contactsState.filterContacts
|
||||||
|
);
|
||||||
return { filteredContacts, setFilteredContacts };
|
return { filteredContacts, setFilteredContacts };
|
||||||
}
|
};
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useRecoilState } from 'recoil';
|
import { useRecoilState } from "recoil";
|
||||||
import { contactsState } from './state';
|
import { contactsState } from "./state";
|
||||||
|
|
||||||
export const useModal = () => {
|
export const useModal = () => {
|
||||||
const [ showModal, setShowModal ] = useRecoilState(contactsState.showModal);
|
const [showModal, setShowModal] = useRecoilState(contactsState.showModal);
|
||||||
return { showModal, setShowModal };
|
return { showModal, setShowModal };
|
||||||
}
|
};
|
||||||
@@ -1,42 +1,47 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
import { shallow } from 'enzyme';
|
import { shallow } from "enzyme";
|
||||||
import TwitterNotification from './TwitterNotification';
|
import TwitterNotification from "./TwitterNotification";
|
||||||
|
|
||||||
jest.mock('react-i18next', () => ({
|
jest.mock("react-i18next", () => ({
|
||||||
useTranslation: () => ({t: key => key})
|
useTranslation: () => ({ t: (key) => key }),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
jest.mock('../../../../os/phone/hooks/usePhone', () => ({
|
jest.mock("../../../../os/phone/hooks/usePhone", () => ({
|
||||||
usePhone: jest.fn().mockReturnValue({ config: {
|
usePhone: jest.fn().mockReturnValue({
|
||||||
twitter: {
|
config: {
|
||||||
showNotifications: true,
|
twitter: {
|
||||||
}
|
showNotifications: true,
|
||||||
} })
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
jest.mock('../../hooks/useTwitterNotification', () => ({
|
jest.mock("../../hooks/useTwitterNotification", () => ({
|
||||||
useTwitterNotification: jest.fn().mockReturnValue({ notification: {
|
useTwitterNotification: jest.fn().mockReturnValue({
|
||||||
profile_name: 'test',
|
notification: {
|
||||||
message: 'test message'
|
profile_name: "test",
|
||||||
} })
|
message: "test message",
|
||||||
|
},
|
||||||
|
}),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
describe("TwitterNotification", () => {
|
||||||
|
let wrapper;
|
||||||
|
|
||||||
describe('TwitterNotification', () => {
|
beforeEach(() => {
|
||||||
let wrapper;
|
wrapper = shallow(<TwitterNotification />);
|
||||||
|
});
|
||||||
|
it("renders", () => {
|
||||||
|
expect(wrapper).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
it("renders profile name", () => {
|
||||||
wrapper = shallow(<TwitterNotification />)
|
expect(wrapper.find(".makeStyles-profileName-5").text()).toEqual("@test");
|
||||||
})
|
});
|
||||||
it('renders', () => {
|
|
||||||
expect(wrapper).toBeDefined();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('renders profile name', () => {
|
it("renders message", () => {
|
||||||
expect(wrapper.find('.makeStyles-profileName-5').text()).toEqual('@test');
|
expect(wrapper.find(".makeStyles-message-7").text()).toEqual(
|
||||||
});
|
"test message"
|
||||||
|
);
|
||||||
it('renders message', () => {
|
});
|
||||||
expect(wrapper.find('.makeStyles-message-7').text()).toEqual('test message');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
@@ -1,48 +1,48 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
|
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
|
||||||
import TwitterIcon from '@material-ui/icons/Twitter';
|
import TwitterIcon from "@material-ui/icons/Twitter";
|
||||||
import { useTwitterNotification } from '../../hooks/useTwitterNotification';
|
import { useTwitterNotification } from "../../hooks/useTwitterNotification";
|
||||||
import Notification from '../../../../ui/components/Notification';
|
import Notification from "../../../../ui/components/Notification";
|
||||||
import { usePhone } from "../../../../os/phone/hooks/usePhone";
|
import { usePhone } from "../../../../os/phone/hooks/usePhone";
|
||||||
|
|
||||||
const useStyles = makeStyles((theme: Theme) =>
|
const useStyles = makeStyles((theme: Theme) =>
|
||||||
createStyles({
|
createStyles({
|
||||||
content: {
|
content: {
|
||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
overflowY: 'hidden'
|
overflowY: "hidden",
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
flexFlow: 'row nowrap',
|
flexFlow: "row nowrap",
|
||||||
justifyContent: 'space-between',
|
justifyContent: "space-between",
|
||||||
alignItems: 'center'
|
alignItems: "center",
|
||||||
},
|
},
|
||||||
titleLeft: {
|
titleLeft: {
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
flexFlow: 'row nowrap',
|
flexFlow: "row nowrap",
|
||||||
justifyContent: 'flex-start',
|
justifyContent: "flex-start",
|
||||||
alignItems: 'center'
|
alignItems: "center",
|
||||||
},
|
},
|
||||||
icon: {
|
icon: {
|
||||||
marginTop: '3px',
|
marginTop: "3px",
|
||||||
marginRight: '5px'
|
marginRight: "5px",
|
||||||
},
|
},
|
||||||
profileName: {
|
profileName: {
|
||||||
marginBottom: '3px',
|
marginBottom: "3px",
|
||||||
},
|
},
|
||||||
justNow: {
|
justNow: {
|
||||||
fontSize: '18px',
|
fontSize: "18px",
|
||||||
fontStyle: 'italic',
|
fontStyle: "italic",
|
||||||
paddingRight: '3px',
|
paddingRight: "3px",
|
||||||
},
|
},
|
||||||
message: {
|
message: {
|
||||||
fontSize: '16px',
|
fontSize: "16px",
|
||||||
overflow: 'hidden',
|
overflow: "hidden",
|
||||||
display: '-webkit-box',
|
display: "-webkit-box",
|
||||||
WebkitLineClamp: 2,
|
WebkitLineClamp: 2,
|
||||||
WebkitBoxOrient: 'vertical',
|
WebkitBoxOrient: "vertical",
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -57,18 +57,24 @@ function TwitterNotification() {
|
|||||||
if (notification) {
|
if (notification) {
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
}, [notification?.id])
|
}, [notification?.id]);
|
||||||
|
|
||||||
if (!config?.twitter.showNotifications || !notification) return null;
|
if (!config?.twitter.showNotifications || !notification) return null;
|
||||||
|
|
||||||
const profileName = `@${notification.profile_name?.trim()}`;
|
const profileName = `@${notification.profile_name?.trim()}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Notification key={notification.id} open={visible} handleClose={() => setVisible(false)}>
|
<Notification
|
||||||
|
key={notification.id}
|
||||||
|
open={visible}
|
||||||
|
handleClose={() => setVisible(false)}
|
||||||
|
>
|
||||||
<div className={classes.content}>
|
<div className={classes.content}>
|
||||||
<div className={classes.title}>
|
<div className={classes.title}>
|
||||||
<div className={classes.titleLeft}>
|
<div className={classes.titleLeft}>
|
||||||
<div className={classes.icon}><TwitterIcon /></div>
|
<div className={classes.icon}>
|
||||||
|
<TwitterIcon />
|
||||||
|
</div>
|
||||||
<div className={classes.profileName}>{profileName}</div>
|
<div className={classes.profileName}>{profileName}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.justNow}>{t("APPS_TWITTER_JUST_NOW")}</div>
|
<div className={classes.justNow}>{t("APPS_TWITTER_JUST_NOW")}</div>
|
||||||
@@ -79,5 +85,4 @@ function TwitterNotification() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default TwitterNotification;
|
export default TwitterNotification;
|
||||||
@@ -38,7 +38,7 @@ export const twitterState = {
|
|||||||
default: null,
|
default: null,
|
||||||
}),
|
}),
|
||||||
notification: atom({
|
notification: atom({
|
||||||
key: 'notification',
|
key: "notification",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
}),
|
||||||
};
|
};
|
||||||
@@ -4,7 +4,7 @@ import { Tweet } from "../interfaces";
|
|||||||
import { twitterState } from "./state";
|
import { twitterState } from "./state";
|
||||||
|
|
||||||
interface ITwitterNotification {
|
interface ITwitterNotification {
|
||||||
notification: Tweet | null;
|
notification: Tweet | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useTwitterNotification = (): ITwitterNotification => {
|
export const useTwitterNotification = (): ITwitterNotification => {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import { IMAGE_DELIMITER } from "../utils/images";
|
|||||||
import { APP_TWITTER } from "../utils/constants";
|
import { APP_TWITTER } from "../utils/constants";
|
||||||
import { twitterState } from "./state";
|
import { twitterState } from "./state";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform all necessary processing/transforms from the raw database
|
* Perform all necessary processing/transforms from the raw database
|
||||||
* data to what the frontend expects
|
* data to what the frontend expects
|
||||||
@@ -59,7 +58,7 @@ export const useTwitterService = () => {
|
|||||||
|
|
||||||
const _setNotification = (tweet) => {
|
const _setNotification = (tweet) => {
|
||||||
setNotification(tweet);
|
setNotification(tweet);
|
||||||
}
|
};
|
||||||
|
|
||||||
const _setTweets = (tweets) => {
|
const _setTweets = (tweets) => {
|
||||||
setTweets(tweets.map(processTweet));
|
setTweets(tweets.map(processTweet));
|
||||||
@@ -75,5 +74,5 @@ export const useTwitterService = () => {
|
|||||||
useNuiEvent(APP_TWITTER, "fetchTweetsFiltered", _setFilteredTweets);
|
useNuiEvent(APP_TWITTER, "fetchTweetsFiltered", _setFilteredTweets);
|
||||||
useNuiEvent(APP_TWITTER, "createTweetLoading", setCreateLoading);
|
useNuiEvent(APP_TWITTER, "createTweetLoading", setCreateLoading);
|
||||||
useNuiEvent(APP_TWITTER, "createTweetResult", _setCreateSuccess);
|
useNuiEvent(APP_TWITTER, "createTweetResult", _setCreateSuccess);
|
||||||
useNuiEvent(APP_TWITTER, 'createTweetBroadcast', _setNotification)
|
useNuiEvent(APP_TWITTER, "createTweetBroadcast", _setNotification);
|
||||||
};
|
};
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
export interface Tweet {
|
export interface Tweet {
|
||||||
id: number;
|
id: number;
|
||||||
profile_name?: string;
|
profile_name?: string;
|
||||||
avatar_url?: string;
|
avatar_url?: string;
|
||||||
message: string;
|
message: string;
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
updatedAt?: string;
|
updatedAt?: string;
|
||||||
images?: string;
|
images?: string;
|
||||||
likes?: number;
|
likes?: number;
|
||||||
}
|
}
|
||||||
+1
-1
@@ -7,7 +7,7 @@ import { RecoilRoot } from "recoil";
|
|||||||
import "./main.css";
|
import "./main.css";
|
||||||
import Phone from "./Phone";
|
import Phone from "./Phone";
|
||||||
import * as serviceWorker from "./serviceWorker";
|
import * as serviceWorker from "./serviceWorker";
|
||||||
import TwitterNotification from './apps/twitter/components/notification/TwitterNotification';
|
import TwitterNotification from "./apps/twitter/components/notification/TwitterNotification";
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<HashRouter>
|
<HashRouter>
|
||||||
|
|||||||
+7
-4
@@ -1,6 +1,6 @@
|
|||||||
body {
|
body {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||||
sans-serif;
|
sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
@@ -10,10 +10,13 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||||
monospace;
|
monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
a, a:visited, a:hover, a:active {
|
a,
|
||||||
|
a:visited,
|
||||||
|
a:hover,
|
||||||
|
a:active {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
@@ -10,8 +10,13 @@ import {
|
|||||||
amber,
|
amber,
|
||||||
} from "@material-ui/core/colors";
|
} from "@material-ui/core/colors";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { faAd, faPlaneArrival, faPhoneAlt, faLandmark } from "@fortawesome/free-solid-svg-icons";
|
import {
|
||||||
import { faTwitter } from '@fortawesome/free-brands-svg-icons'
|
faAd,
|
||||||
|
faPlaneArrival,
|
||||||
|
faPhoneAlt,
|
||||||
|
faLandmark,
|
||||||
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { faTwitter } from "@fortawesome/free-brands-svg-icons";
|
||||||
|
|
||||||
import ContactsIcon from "@material-ui/icons/Contacts";
|
import ContactsIcon from "@material-ui/icons/Contacts";
|
||||||
import SettingsIcon from "@material-ui/icons/Settings";
|
import SettingsIcon from "@material-ui/icons/Settings";
|
||||||
@@ -90,7 +95,7 @@ const appsState = atom({
|
|||||||
{
|
{
|
||||||
id: "TWITTER",
|
id: "TWITTER",
|
||||||
nameLocale: "APPS_TWITTER",
|
nameLocale: "APPS_TWITTER",
|
||||||
icon: <FontAwesomeIcon icon={faTwitter} fixedWidth size="xs"/>,
|
icon: <FontAwesomeIcon icon={faTwitter} fixedWidth size="xs" />,
|
||||||
backgroundColor: blue[600],
|
backgroundColor: blue[600],
|
||||||
color: common.white,
|
color: common.white,
|
||||||
path: "/twitter",
|
path: "/twitter",
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ interface TwitterConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface NotificationConfig {
|
interface NotificationConfig {
|
||||||
horizontal: 'left' | 'center' | 'right';
|
horizontal: "left" | "center" | "right";
|
||||||
vertical: 'bottom' | 'top';
|
vertical: "bottom" | "top";
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ServerConfig {
|
export interface ServerConfig {
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { ThemeProvider } from "@material-ui/core";
|
import { ThemeProvider } from "@material-ui/core";
|
||||||
import Paper from '@material-ui/core/Paper';
|
import Paper from "@material-ui/core/Paper";
|
||||||
import Snackbar from '@material-ui/core/Snackbar';
|
import Snackbar from "@material-ui/core/Snackbar";
|
||||||
import Fade from '@material-ui/core/Fade';
|
import Fade from "@material-ui/core/Fade";
|
||||||
import { makeStyles } from "@material-ui/core/styles";
|
import { makeStyles } from "@material-ui/core/styles";
|
||||||
import { useSettings } from "../../apps/settings/hooks/useSettings";
|
import { useSettings } from "../../apps/settings/hooks/useSettings";
|
||||||
import { usePhone } from "../../os/phone/hooks/usePhone";
|
import { usePhone } from "../../os/phone/hooks/usePhone";
|
||||||
|
|
||||||
const useStyles = makeStyles({
|
const useStyles = makeStyles({
|
||||||
paper: {
|
paper: {
|
||||||
width: '350px',
|
width: "350px",
|
||||||
height: '100px',
|
height: "100px",
|
||||||
opacity: '0.93',
|
opacity: "0.93",
|
||||||
}
|
},
|
||||||
|
snackBar: {
|
||||||
|
zIndex: -5, // we want this to appear behind other active NUI events...probably
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function Notification({ children, handleClose, open }) {
|
function Notification({ children, handleClose, open }) {
|
||||||
@@ -26,21 +29,19 @@ function Notification({ children, handleClose, open }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider theme={currentTheme()}>
|
<ThemeProvider theme={currentTheme()}>
|
||||||
<Snackbar
|
<Snackbar
|
||||||
anchorOrigin={{ horizontal, vertical }}
|
className={classes.snackBar}
|
||||||
ClickAwayListenerProps={{ onClickAway: () => null }}
|
anchorOrigin={{ horizontal, vertical }}
|
||||||
onClose={handleClose}
|
ClickAwayListenerProps={{ onClickAway: () => null }}
|
||||||
open={open}
|
onClose={handleClose}
|
||||||
TransitionComponent={Fade}
|
open={open}
|
||||||
autoHideDuration={6000}
|
TransitionComponent={Fade}
|
||||||
>
|
autoHideDuration={6000}
|
||||||
<Paper className={classes.paper}>
|
>
|
||||||
{children}
|
<Paper className={classes.paper}>{children}</Paper>
|
||||||
</Paper>
|
</Snackbar>
|
||||||
</Snackbar>
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default Notification;
|
export default Notification;
|
||||||
@@ -1 +1,44 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="%PUBLIC_URL%/favicon.ico"/><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><title>React App</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="main.js"></script></body></html>
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Web site created using create-react-app"
|
||||||
|
/>
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Notice the use of in the tags above.
|
||||||
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
|
|
||||||
|
Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
|
||||||
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
|
-->
|
||||||
|
<title>React App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
<script src="dev.js"></script></body>
|
||||||
|
</html>
|
||||||
Reference in new issue
Block a user