Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jermxt committed Oct 16, 2022
2 parents de54912 + b5a2356 commit 462f3a0
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
Binary file modified backend/__pycache__/database.cpython-310.pyc
Binary file not shown.
Binary file modified backend/__pycache__/model.cpython-310.pyc
Binary file not shown.
Binary file modified backend/__pycache__/twilio_routes.cpython-310.pyc
Binary file not shown.
Binary file modified backend/__pycache__/users.cpython-310.pyc
Binary file not shown.
8 changes: 6 additions & 2 deletions frontend/src/components/CountdownTimer/CountdownTimer.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import React from 'react';
import React, { useEffect, useState } from "react";
import "./datetime.css";
import DateTimeDisplay from './DateTimeDisplay';
import { useCountdown } from './useCountdown';
import { currUserAtom } from "../../atoms";
import { useAtom } from "jotai";

const ExpiredNotice = () => {

const [user, setUser] = useAtom(currUserAtom);

const notifyTwilio = async () => {
searchUrl = `http://localhost:4000/twlio/activateAlarm`
const searchUrl = `http://34.168.40.206:4000/twilio/activateAlarm/`
const response = await fetch(searchUrl, {
mode: 'cors',
method: 'POST',
Expand Down
19 changes: 18 additions & 1 deletion frontend/src/components/FriendSearch/FriendSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import { useNavigate } from "react-router-dom";
import "./FriendSearch.css";

function FriendSearch() {
Expand All @@ -17,6 +18,7 @@ function FriendSearch() {
const [inputText, setInputText] = useState("");
const [response, setResponse] = useState(null);
const [friends, setFriends] = useState([]);
const navigate = useNavigate();
// const [error, setError] = useState(null);

const getFriends = async () => {
Expand Down Expand Up @@ -84,14 +86,18 @@ function FriendSearch() {
console.log(friends)
}, [])

const navigateAlarm = () => {
navigate("/alarm")
}

return (
<div className="outer-box">
<div className="main">
<img className="angybee" src={require("../../assets/angybees.png")}></img>
<div className="title">find friends</div>
<div className="search">
<TextField
style={{ width: "30vw", textAlignLast: 'center' }}
style={{ width: "20vw", textAlignLast: 'center' }}
id="outlined-basic"
variant="outlined"
fullWidth
Expand All @@ -100,13 +106,24 @@ function FriendSearch() {
onChange={inputHandler}
/>
{response && <><small style={{ color: 'red' }}>{response}</small><br /></>}<br />

<div>
<Button
style={{ backgroundColor: "rgba(186,209,250)", fontFamily: "DM SANS", textTransform: "lowercase", color: "black", boxShadow: "none", marginRight: "10px", marginBottom: "5px"}}
onClick={handleSubmit}
variant="contained"
>
add friend
</Button>
<Button
style={{ backgroundColor: "rgba(255, 242, 134, .7)", fontFamily: "DM SANS", textTransform: "lowercase", color: "black", boxShadow: "none", marginRight: "10px", marginBottom: "5px"}}
onClick={navigateAlarm}
variant="contained"
>
go back
</Button>
</div>

</div>
<p class="title"> current friends</p>
<List style={{ textAlignLast: "center" }}>
Expand Down

0 comments on commit 462f3a0

Please sign in to comment.