-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5caf518
commit afa6bc6
Showing
5 changed files
with
64 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,46 @@ | ||
import {Component} from "react"; | ||
import Image from "next/image"; | ||
|
||
interface ExecProfileState | ||
{ | ||
ImageBuffer: string; | ||
} | ||
|
||
interface ExecProfileProps | ||
{ | ||
ID: number; | ||
|
||
Name: string; | ||
|
||
ImageID: string; | ||
ImageBuffer: string; | ||
|
||
Position: number; | ||
} | ||
|
||
export class ExecProfile extends Component<ExecProfileProps, ExecProfileState> | ||
{ | ||
public constructor(props: ExecProfileProps) | ||
{ | ||
super(props); | ||
} | ||
|
||
public async componentDidMount() | ||
{ | ||
this.setState({ImageBuffer: (await (await fetch("http://localhost:5031/Exec/Image/" + this.props.ImageID, | ||
{headers: { apikey: "eerSS5qfGUi0H+XQr702DYouu7E+55RWSZ8mLp+iu4QH6fZdqH1NFsaVgFx/CvUpRXioIiq8B9NomnSD2ClFUA==" }})).json())["Payload"]}); | ||
console.log(this.state.ImageBuffer); | ||
} | ||
const PositionStrings: string[] = [ | ||
"President", | ||
"Vice Presdent", | ||
"Tech Lead", | ||
"General Representative", | ||
"Director of Public Relations", | ||
"Director of Finance", | ||
"Director of Events" | ||
]; | ||
|
||
export default function ExecProfile({ID, Name, ImageBuffer, Position} : ExecProfileProps) | ||
{ | ||
console.log(`Position: ${Position}`); | ||
|
||
public render() | ||
{ | ||
return ( | ||
<div className={"flex items-start"}> | ||
<div className="box-border bg-[#262626] h-32 w-[80vh] p-4 rounded"> | ||
<div className={"grid grid-col-[40%_60%]"}> | ||
{/* <div className={"relative border-box bg-lang-orange h-[10vh] w-20 rounded"}>*/} | ||
{/* <Image src={this.state.ImageBuffer} width={20} height={20} alt={""}/>*/} | ||
{/* </div>*/} | ||
{/*<div>*/} | ||
{/* {this.props.Name}*/} | ||
{/* {this.props.Position}*/} | ||
{/*</div>*/} | ||
</div> | ||
return ( | ||
<div className={"flex items-start"}> | ||
<div className="box-border bg-[#262626] h-32 w-[80vh] p-4 rounded"> | ||
<div className={"flex flex-row"}> | ||
<div className={"relative border-box bg-lang-orange h-[10vh] w-20 rounded"}> | ||
<Image src={ImageBuffer} width={100} height={100} alt={Name}/> | ||
</div> | ||
<div className="flex flex-row"> | ||
<span>{Name} |</span> | ||
<span>{PositionStrings[Position]}</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
</div> | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters