Skip to content

Commit

Permalink
Added buttons, unfunctional, styling still in work
Browse files Browse the repository at this point in the history
I am going to go play zelda
  • Loading branch information
lachlanPaul committed Aug 14, 2023
1 parent 3c3eecf commit 359b045
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const db = getDatabase(app);

// Store what channel the user is currently in
export let currentChannel = "main";
export function setCurrentChannel(channel: string): void {
currentChannel = channel;
}

// Define structure of user data from Firebase
export interface UserData {
Expand Down
14 changes: 14 additions & 0 deletions src/css/Channels.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,17 @@
width: 20%;
z-index: 1;
}

.buttons{
height: 50px;
width: 90%;
border: none;
border-radius: 5px;
background-color: rgb(70, 150, 10);
cursor: pointer; /* Makes cursor change on hover */
margin: 7px;
}

.buttons:hover{
background-color: rgb(70, 170, 10);
}
19 changes: 17 additions & 2 deletions src/layout/Channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,31 @@
*/

import "../css/Channels.css";

import {setCurrentChannel} from "../Firebase";

function Channels() {

return (
<>
<div className = "menu">
{/* <p>seggs</p> */}
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<center>
<button onClick={() => {setCurrentChannel("main");}} className="buttons">Main</button>
<button onClick={() => {setCurrentChannel("sec");}} className="buttons">Sec</button>
</center>
</div>
</>
);
}

// New channels must be added manually
/**
* main: Bunyips Robotics Club
* sec: Test Channel
*/
const channels: Array<string> = ["main", "sec"];
export default Channels;

0 comments on commit 359b045

Please sign in to comment.